Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> SQLException with ORA-01002 in Jdbc thin and Oracle8

SQLException with ORA-01002 in Jdbc thin and Oracle8

From: <jameswalter_at_sc.slr.com>
Date: Mon, 18 Jan 1999 21:38:10 GMT
Message-ID: <7809k0$dpe$1@nnrp1.dejanews.com>


Could someone please help me.

I am getting the following Exception when I run my sample program against an Oracle 8 database
using Jdbc thin driver for Oracel 8.

java.sql.SQLException: ORA-01002: fetch out of sequence at

oracle.jdbc.ttc7.TTIoer.processError(Compiled Code)  at
oracle.jdbc.ttc7.Oall7.receive(Compiled Code)	     at
oracle.jdbc.ttc7.TTC7Protocol.doOall7(Compiled Code)	     at
oracle.jdbc.ttc7.TTC7Protocol.fetch(TTC7Protocol.java:723)   at
oracle.jdbc.driver.OracleStatement.doExecuteQuery(Compiled Code)     at
oracle.jdbc.driver.OracleStatement.doExecute(OracleStatement.java:1162)     
at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java: 121 0) at
oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStateme nt. java:60)

The same sample program works fine against any Oracle 7 database.

Code Segment:



String select ="select * from test for update "; PreparedStatement psmt = connection.prepareStatement(select); Resultset rs = psmt.executeQuery();

If I remove "for update " clause from the select statement I do not get the error and everything
works fine. What I am doing wrong?

-James walter

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Mon Jan 18 1999 - 15:38:10 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US