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 -> OCIStmtFetch error handling

OCIStmtFetch error handling

From: music4 <music4_at_163.net>
Date: Tue, 29 Jun 2004 15:46:27 +0800
Message-ID: <cbr6o2$1sh@netnews.proxy.lucent.com>


Greetings,

I am using OCI8. Say following code model:

OCIStmtExecute("select .. from .. where ...");

while (1)
{

      switch (OCIStmtFetch())
      {
       case OCI_SUCCESS:
                  handle the data;
                  break;
       case OCI_NO_DATA:
                   return;
        default:
                   // Error occur
        }

}

My question is for error handling. Error might be "fetched column is NULL", etc. But anyway, it should be a record level. What I want to do is to skip the wrong record and process rest records.

And I am wondering when OCIStmtFetch returns error, can I get rowid or primary key value of the error record so that I can delete the error record?

Evan

--
Li, Evan Chao
==========================================
Software Support Center, Lucent Qingdao(QD) , R&D
Tel: (Office) +86-532-8702000 x5231
Email: cli4_at_lucent.com
http://gdcsr60.gdc.lucent.com/qdr&d/cfd_labsuprt/ssc/index.html
Received on Tue Jun 29 2004 - 02:46:27 CDT

Original text of this message

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