ResultSet 只能检索
update 用于修改
update 用于修改
解决方案 »
- [Java高手来翻译下]Java语言规范JLS 6.6.2 翻译
- 简单的java程序过不了编译!
- 请教一个关于正则的我认为“比较难”的问题
- 八个J2EE的高级群,按层次划分,共享教程代码,期待各位朋友加入(需考试)
- 有关于全屏显示的问题。。。。。。。。。。。。。。。。。。
- 来者有分,初学者.
- 请教:如何给一个JTree的每个节点加上ToolTipText?
- Socket编程问题
- 如何知道某class或interface被某jdk支持与否
- 众位大虾菜鸟,能否介绍几个好的java网站(附加点评)?来者有分!
- 怎么样用java写一个程序,把.dbf的文件转成mysql的文件?急!!!
- 如何用按钮为queryDataSet增加一行?
rs.updateString("NAME", "AINSWORTH"); // updates the
// NAME column of row 5 to be AINSWORTH
rs.updateRow(); // updates the row in the data source to insert column values into the insert row. An updatable ResultSet object has a special row associated with it that serves as a staging area for building a row to be inserted. The following code fragment moves the cursor to the insert row, builds a three-column row, and inserts it into rs and into the data source table using the method insertRow. rs.moveToInsertRow(); // moves cursor to the insert row
rs.updateString(1, "AINSWORTH"); // updates the
// first column of the insert row to be AINSWORTH
rs.updateInt(2,35); // updates the second column to be 35
rs.updateBoolean(3, true); // updates the third row to true
rs.insertRow();
rs.moveToCurrentRow();
另外,select两个表得出的ResultSet是只读的,不能进行updateRow操作。是这样吗?