MariaDB社区

标题: Jsp 连接 MySQL 数据库 [打印本页]

作者: kider    时间: 2013-6-13 17:47
标题: Jsp 连接 MySQL 数据库
String url ="jdbc:mysql://localhost/softforum?user=soft&password=soft1234&useUnicode=true&characterEncoding=8859_1"
Connection conn= DriverManager.getConnection(url);
Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
String sql="select * from test";
ResultSet rs=stmt.executeQuery(sql);







欢迎光临 MariaDB社区 (http://123.56.88.72/) Powered by Discuz! X3.2