This page contains an archived post to the Java Answers Forum made prior to February 25, 2002.
If you wish to participate in discussions, please visit the new
Artima Forums.
Message:
Updatable Result Set
Posted by Ahu Eryuruk on July 19, 2001 at 4:48 AM
Hello, I am trying to use the updatable resultset in my program.I am developing a servlet with IBM Visulage for Java (including the feature, Oracle JDBC JDK 11 ) on NT environment and connecting to an Oracle database. When creating a statement, I receive such an error as : "java.lang.AbstractMethodError java.lang.Throwable() java.lang.Error() java.lang.LinkageError() java.lang.IncompatibleClassChangeError() java.lang.AbstractMethodError() java.sql.Statement com.ibm.ejs.cm.pool.ConnectO.createStatement(int, int) java.sql.Statement com.ibm.ejs.cm.pool.ConnectO.createStatement(int, int) java.sql.Statement com.ibm.ejs.cm.proxy.OracleConnectionProxy.createStatement(int, int) void com.abank.cbs.login.SetUserPasswordCommand.setPassword(java.lang.String) void com.abank.esube.actions.login.ChangeUserPasswordAction.triggerChangeUserPasswordAutorize(com.abank.servlet.framework.ActionContext) void....." And here is the code I use; Context ctx = new InitialContext(); DataSource ds = (DataSource)ctx.lookup("jdbc/ahu");
String strSelect = "SELECT uname, usirname FROM user"; String strWhere = "WHERE (USERID = '323232') "; Connection connection = ds.getConnection("ahu", "ahu"); Statement stmt = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); ResultSet rs = stmt.executeQuery(strSelect + strWhere); while (rs.next() ) { rs.updateString("uname","ahu"); rs.updateRow(); } stmt.close(); connection.close(); Any help is appreciated. Regards, Ahu ERYURUK
Replies:
|