There is already an open DataReader associated with this Connection which must be closed first".

  • Thread starter Thread starter VIswanathan S
  • Start date Start date
V

VIswanathan S

Hi All!

i am using the oledb connection to connect Oracle database. I use the code
for connectiong to datawindow as

Public sqlca As Sybase.DataWindow.AdoTransaction
Public con as oledb.oledbconnection

'con as oracle connection
con.open()

sqlca = New Sybase.DataWindow.AdoTransaction(con)
sqlca.BindConnection()

The connection and data aretrieved fine.

At one part of time i get the error as "There is already an open DataReader
associated with this Connection which must be closed first".

if i use sqlca.unbindconnection() and do some database activities using
oledbdataadapter and dataset. but i didn't use any datareader. When i bind
the connection to sqlca as

sqlca.bindconnection() i get the above error.

Is there any datareader used by Sybase.DataWindow.AdoTransaction?

Note: The database is in remote. retrival from clsong and opening connection
takes a long time.

How can i solve it without reconnecting to the database?

Thanks in Advance
S. Viswanathan
 
Why are you using OleDb to connect to Oracle? Why not OracleClient?
OracleClient will let you use MARS which will let you mantain multiple
resultsets.
 
Back
Top