DataReader.Read() Ends program

  • Thread starter Thread starter Andy
  • Start date Start date
A

Andy

Hi all,

I have an odd problem, which I traced back to a line of code.

I have a record set coming back into a DataReader (OdbcDataReader in my
case). I can .Read() once, but when the loop starts again and the
..Read() is executed a second time, the application just ends.

There are NO exceptions, logs or anything, its as if the .Read method
called Application.Exit().

Any ideas?

Thanks
Andy
 
Sahil,

Yes, I have a try catch. The program simply terminates. No
exceptions, its as if running the line were Application.Exit().

I did find the cause though; a very badly design ODBC driver. You can
have an OR in the WHERE clause, but if you don't do it EXACTLY the way
it wants, it closes the caller.

Andy
 
Back
Top