createStatement(ResultSet.TYPE_SCROLL_SENSITIVE ,ResultSet.CONCUR_UPDATABLE );
解决方案 »
- 初学:flex与java结合,RemoteObject如何调用java类..配置文件出错..(急救)
- jsp调试出现的问题
- 那位做过自动售货机上使用短信查询项目的,有问题请教。
- 关于两个.jsp文件传递表单的问题,有关数据库知识急!急!急!~!~!~!~!~!~!
- 求关于iText的PdfPTable 和PdfPCell的使用
- 路过的朋友注意啦,100分求教一个有难度的问题(不够在加),关于ArrayList的,非常非常的着急!!!
- 把自己写的类打包成JAR文件的问题????
- 简单问题,提示not a statement
- 跳转前URL问题
- 关于Tomcat的配置问题,请各位赐教
- 很简单的问题!!!
- jsp + tomcate + apache 怎么了?这么慢!!!!!!!!!!! 高分送上.
请看有关文档:updateString
public void updateString(String columnName,
String x)
throws SQLException
Updates the designated column with a String value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
String password="";
String dbs="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=gpy";
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
Connection conn= DriverManager.getConnection(dbs,user,password);
String sqls="update pubs set cj=?"; prepareStatement preparestatement=conn.createprepareStatement();
ResultSet rs=preparestatement.executeQuery(sqls);
while(rs.next())
{
rs.setString(cj[j]);
j++;
}