new sun.jdbc.odbc.JdbcOdbcDriver(); Connection conn=DriverManager.getConnection("jdbc:odbc:test","",""); PreparedStatement pstmt = conn.prepareStatement("update yourtable set name = ? where name = ?") pstmt.setString(1,"new name"); pstmt.setString(2,"old name"); pstmt.executeUpdate(); 你还是找本书来看吧,很多书上都有这方面的例子的。
Connection conn=DriverManager.getConnection("jdbc:odbc:test","","");
PreparedStatement pstmt = conn.prepareStatement("update yourtable set name = ? where name = ?")
pstmt.setString(1,"new name");
pstmt.setString(2,"old name");
pstmt.executeUpdate();
你还是找本书来看吧,很多书上都有这方面的例子的。