Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

OracleDataReader.Read() throws Exception! How can I skip a row?

672851Nov 27 2008
Hello,
I am trying to do a simple dump of a huge table (~25 million rows) from
an Oracle database using Oracle Data Provider.Net.
I am calling ExecuteReader() on the Command object and then
OracleDataReader.Read() in a loop.
Some where halfway through, an exception is thrown because of corrupt data
(ORA-29275: partial multibyte character)

Oracle.DataAccess.dll version:: *2.111.6.20*

I want to know if it is possible to skip this particular row and continue
with the rest of rows.

When using a try/catch block and trying to read again in the catch block, naturally the
cursor is not valid (i get a "ORA-01002: fetch out of sequence" error).

Is there some sort of "peek" or "skip" in OracleDataReader so that I can
ignore the problematic row(s)?

And there's nothing I can do to fix the actual data :-(
I have only read permission on the target DB. So I cannot change anything.

Thanks in advance!

-Regards,
Venkat.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 25 2008
Added on Nov 27 2008
0 comments
1,797 views