Weird ODBC Error - KB-SQL



I am using an ODBC connection based on the KB_SQL 32 ODBC driver and
connecting to mumps.

I am extracting records based on line in an input file and writing them
to a text file. Here is an example:

Do Until MyReader.EndOfStream

connectionSLAB.Open()

selectCommand = New OdbcCommand(selectStatement &
MyReader.ReadLine() & "'", connectionSLAB)

dr = selectCommand.ExecuteReader(CommandBehavior.CloseConnection)

If dr.HasRows Then
.................................
End if

dr.Close()

Loop


I can run 1,000's of these queires, however, every so often, I get this
message in my exception handler:

at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle,
RetCode retcode)
at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior
behavior, String method, Boolean needReader, Object[] methodArguments,
SQL_API odbcApiMethod)
at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior
behavior, String method, Boolean needReader)
at System.Data.Odbc.OdbcCommand.ExecuteReader(CommandBehavior
behavior)


I have searched google high and low and have not found anything similar
to this. I can go a few days and run literally 100,000 queries with no
problem. Every once in a while i get the above error.

I think it may have to do with maybe another process accessing the
mumps global but really am not sure.

Any ideas?

Thanx much.....jay parzych

.



Relevant Pages