wyTT

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

1、加载驱动程序

  Class.forName(DriverClass);

2、连接数据库

  Connection connect = DriverManager.getConnection(DataBase URL);

3、创建语句

  Statement statement = connect.createStatement();

4、执行语句

  ResultSet rs = statement.executeQuery(SQL语句);

5、处理ResultSet

posted on 2015-09-01 20:12  wyTT  阅读(962)  评论(0编辑  收藏  举报