faqts : Computers : Programming : Languages : PHP : Database Backed Sites : Oracle : Errors

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

60 of 120 people (50%) answered Yes
Recently 4 of 10 people (40%) answered Yes

Entry

What does the OCI error "fetch out of sequence" mean?

Sep 7th, 1999 08:20
Nathan Wallace, Onno Benschop,


Fetch out of sequence usually means that you are trying to read from a
cursor that has no data left (like EOF).

The error usually looks something like this:

    Warning : OCIFetchInto: ORA-01002: fetch out of sequence in 
                                       type1.inc on line 36

Your read loop should look like this:

    $stmt = ociparse($conn,"select ...");

    while (ocifetch($stmt))
    { // work with the data...
    }

    // no all data for the select is read!

    ocifetch($stmt); // this will cause an ORA-01002