Fetch Out Of Sequence - Oracle Provider? 
Author Message
 Fetch Out Of Sequence - Oracle Provider?

Hello All,

I have had an app running for years with no problem until today when the DBA
upgraded the Oracle database to version 8.

I now get an error thrown back after trying to read data returned from the
following FOR UPDATE statement

SQL = "select ag_code from my_codes where record_id=1 FOR UPDATE"
myRS.open SQL,myConn,adOpenStatic,adLockReadOnly
myCode = myRS("ag_code")

The error is : ORA-01002: fetch out of sequence

The DBA says there is a prob with my code, but it worked fine for 3 years
before he upgraded the database. I am happy to change the code if I need to
but what do I change it to. I need to use the FOR UPDATE to lock the record
so that codes are not duplicated.

Many thanks in advance for any advice.

Best Regards,
Derek



Sun, 04 Dec 2005 22:43:14 GMT  
 Fetch Out Of Sequence - Oracle Provider?
Hi Derek,

Check next KB

http://support.microsoft.com/default.aspx?scid=kb;en-us;225110

--
Val Mazur
Microsoft MVP


Quote:
> Hello All,

> I have had an app running for years with no problem until today when the
DBA
> upgraded the Oracle database to version 8.

> I now get an error thrown back after trying to read data returned from the
> following FOR UPDATE statement

> SQL = "select ag_code from my_codes where record_id=1 FOR UPDATE"
> myRS.open SQL,myConn,adOpenStatic,adLockReadOnly
> myCode = myRS("ag_code")

> The error is : ORA-01002: fetch out of sequence

> The DBA says there is a prob with my code, but it worked fine for 3 years
> before he upgraded the database. I am happy to change the code if I need
to
> but what do I change it to. I need to use the FOR UPDATE to lock the
record
> so that codes are not duplicated.

> Many thanks in advance for any advice.

> Best Regards,
> Derek



Sun, 04 Dec 2005 22:45:30 GMT  
 Fetch Out Of Sequence - Oracle Provider?
Val,

Superb, that works a treat. Many thanks for your fast response.

Best Regards,
Derek


Quote:
> Hi Derek,

> Check next KB

> http://support.microsoft.com/default.aspx?scid=kb;en-us;225110

> --
> Val Mazur
> Microsoft MVP



> > Hello All,

> > I have had an app running for years with no problem until today when the
> DBA
> > upgraded the Oracle database to version 8.

> > I now get an error thrown back after trying to read data returned from
the
> > following FOR UPDATE statement

> > SQL = "select ag_code from my_codes where record_id=1 FOR UPDATE"
> > myRS.open SQL,myConn,adOpenStatic,adLockReadOnly
> > myCode = myRS("ag_code")

> > The error is : ORA-01002: fetch out of sequence

> > The DBA says there is a prob with my code, but it worked fine for 3
years
> > before he upgraded the database. I am happy to change the code if I need
> to
> > but what do I change it to. I need to use the FOR UPDATE to lock the
> record
> > so that codes are not duplicated.

> > Many thanks in advance for any advice.

> > Best Regards,
> > Derek



Sun, 04 Dec 2005 23:09:34 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Connecting to Oracle thru Oracle OLE DB Provider(OraOLDDB.Oracle)

2. MS Remote Provider and fetching records

3. Unable to connect Oracle using the Microsoft OLE DB Provider for Oracle

4. In Crystal 6.0 Cannnot fetch data from Number fields in Oracle 7.3

5. Fetching all rows with VB and Oracle

6. Won't allow fetching backwords with ADO 2.5 and Personal Oracle

7. Writting a function to call Oracle Sequences

8. Access to drive Oracle record sequence through ODBC

9. ADO Recordset for getting Oracle sequence.NEXTVAL

10. ADO Recordset for getting Oracle sequence.NEXTVAL

11. Sequence in Oracle with ODBC

12. Visual Basic, Remote data control and Sequence of Oracle

 

 
Powered by phpBB® Forum Software