标签:style blog io ar color os 使用 sp on
PreparedStatement的使用:
conn = DriverManager.getConnection("jdbc:mysql://localhost/mydata?" + "user=root&password=root"); pstmt = conn.prepareStatement("insert into dept values (?,?,?)"); pstmt.setInt(1,deptno); pstmt.setString(2,dname); pstmt.setString(3,loc); pstmt.executeUpdate();
标签:style blog io ar color os 使用 sp on
原文地址:http://www.cnblogs.com/hixin/p/4148236.html