PC Review


Reply
Thread Tools Rate Thread

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

 
 
VIswanathan S
Guest
Posts: n/a
 
      28th Sep 2005
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


 
Reply With Quote
 
 
 
 
Sahil Malik [MVP]
Guest
Posts: n/a
 
      6th Oct 2005
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.


"VIswanathan S" <(E-Mail Removed)> wrote in message
news:eNj7d8%(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: System.InvalidOperationException: There is already an open DataReader associated with this Connection which must be closed first [MSFT] Microsoft ADO .NET 3 3rd May 2004 05:16 PM
error: There is already an open DataReader associated with this Connection which must be closed first Mike Microsoft ADO .NET 1 30th Apr 2004 04:04 PM
RE: System.InvalidOperationException: There is already an open DataReader associated with this Connection which must be closed first Kevin Yu [MSFT] Microsoft ADO .NET 7 20th Apr 2004 01:29 PM
There is already an open DataReader associated with this Connection which must be closed first, AGAIN !!!!!! ItsMe Microsoft ADO .NET 4 19th Feb 2004 04:38 PM
There is already an open DataReader associated with this Connection which must be closed first Harley Microsoft ADO .NET 2 16th Dec 2003 03:03 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:44 PM.