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

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
 
S

Sahil Malik [MVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top