您的位置:首页 > 其它

JDBC_1_2010_03_21(补)

2010-03-21 09:09 232 查看
JDBC
Java Database Connectivity
JDBC简介
SQL语言回顾
JDBC基础编程
JDBC编程高级
DataSource and RowSet

SQL语言回顾
Select
Insert
Create
Delete
Update
Drop
JDBC 编程步骤
1. Load the Driver
(1)Class.forName()|Class.forName().newlnstance()|new DriverName()
(2)实例化时自动向DriverManager注册,不需显示调用DriverManager.registerDriver 方法
2. Connect to the DataBase
(1)DriverManager.getConnectioin()
3. Execute the SQL
(1)Connectioin.CreateStatement()
(2)Statement.executeQuery()
(3)Statement.executeUpdate()
4. Retrieve the result data
(1)循环取得结果 while(rs.next())
5. Show the result data
(1)将数据库中的各种类型转换为java中的类型(getxxx)方法
6. Close
(1)close the resultset / close the statement / close the connectioin
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: