Hi,
I am using Oracle Jdbc Driver , the code is like following:
try{
Connection con= getConnect();
String sql="select f1 from ttt for update";
PreparedStatement stmt = con.prepareStatement(sql);
ResultSet rs= stmt.executeQuery();
OracleResultSet ors=(OracleResultSet)rs;
if(ors.next()){
System.out.println("****"+ors.getString(1));
}
ors.close();
stmt.close();
con.close();
}catch(Exception e){
e.printStackTrace();
}
when table have rows it will throw exception like following , but not happen is there
is no rows selected ,
why , is Oracle Jdbc Drive have bug ?
java.sql.SQLException: ORA-01002: ??????( reading is violate sequence)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
at oracle.jdbc.ttc7.TTC7Protocol.fetch(TTC7Protocol.java:889)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.jav
a:1681)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStateme
nt.java:1870)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePrepar
edStatement.java:363)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePrepare
dStatement.java:314)
at Save1.main(Save1.java:20)
Thank you !
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets