ํฐ์คํ ๋ฆฌ ๋ทฐ
package com.ajax;
import java.sql.*;
public class UserManager {
public User getUser(String id) {
User user = null;
try {
//jdbc 1
Class.forName("oracle.jdbc.OracleDriver");
//jdbc 2
Connection con = DriverManager.getConnection("jdbc:oracle:thin:@211.241.228.11:1521:orcl", "user01", "user01");
//jdbc 3
String sql = "select * from member where id = ?";
//jdbc 4
PreparedStatement pstmt = con.prepareStatement(sql);
//jdbc 5
pstmt.setString(1, id);
//jdbc 6
ResultSet rs = pstmt.executeQuery();
if (rs.next()) {
//์กฐํ๋ ๋ฐ์ดํฐ๊ฐ ์์ผ๋
user = new User();
user.setId(rs.getString(1));
user.setPwd(rs.getString(2));
user.setName(rs.getString(3));
}
//jdbc 7
rs.close();
pstmt.close();
con.close();
} catch (Exception e) {
}
return user;
}
}
'JS' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
ํ ์ด๋ธ ๋ฆฌ์คํธ์ค 10๊ฐ 20๊ฐ 30๊ฐ ๋ณด์ฌ์ฃผ๊ธฐ (0) | 2011.01.14 |
---|---|
jquery ํด๋ฆญํ ์ค๋ธ์ ํธ ID ์์๋ด๊ธฐ (0) | 2010.12.22 |
ajax ๋๋ฒ์งธ (0) | 2010.07.13 |
ajax ๋๋ฒ์งธ (0) | 2010.07.13 |
ajax ๋๋ฒ์งธ (0) | 2010.07.13 |
- Total
- Today
- Yesterday
- ํจ์
- EL
- ์ธํจ์ด
- 2ne1
- ๊ฒฝ์ ์ฉ์ด
- JSTL
- jQuery
- Servlet
- Ajax
- MS-SQL
- MySQL
- ์น์์ด์ ์
- ์นด๋ฐ์จ๋ผ์ธ
- php
- JSP
- ๋ณต๊ทผ์ด๋
- ๊ธฐํ
- JS
- ์์์ฌ์ด๋
- ์๋ธ๋ฆฟ
- JSON
- ๋์ค
- ๋ฉ๋ฐฐํ
- I Don't Care
- ์๋ฐ์คํฌ๋ฆฝํธ
- asp
- JavaScript
- ์๋ฆฌ
- Java
- 8๋ง์ผ
์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |