IDataReader.Read() throws Exception! How can i skip a row?

  • Thread starter Thread starter Venkat
  • Start date Start date
V

Venkat

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
DataReader.Read() in a loop.
Some where halfway through, an exception is thrown because of corrupt data
(ORA-29275: partial multibyte character)

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

Other limitations:
1) I have only read permission on the target DB. So I cannot change anything.

-Regards,
Venkat
 
Patrice,
Thanks for your response.
When using a try/catch block and trying to read again in the catch block 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 :-(

-Venkat
 
Given the other advice already given, I would also look for another Oracle
..NET Managed provider--there are several available (for a price). I would
not use an OLE DB or ODBC provider/driver except as a last resort.

--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)
http://betav.com/blog/billva
http://betav.com
____________________________________________________________________________________________
 
Back
Top