Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

In one tab of a tabcontrol I'm loading information from a database with a DataReader. But this takes quite a bit of time, so I use

 

Application.DoEvents()

 

But I have also another tab that loads also information with another DataReader.

 

Problem:

------------

When the first data is loading, I click on the other tab, so to have the other information. But it gives an error, because I have two open DataReaders.

 

Does someone has a solution for that???

Maybe a solution for this is STOPPING the first DataReader and starting the other, but how do you do that in code because of the different procedures that are running during the process????

 

Thanks

 

Nico

Visit http://www.nico.gotdns.com

 

Now ONLINE!

Posted

Yep, I thought about that, but that takes more time.

 

Maybe a better solution is STOPPING the first DataReader and starting the other, but how do you do that in code because of the different procedures that are running during the process????

Visit http://www.nico.gotdns.com

 

Now ONLINE!

Posted
While a data reader is open, its associated connection can't be used by any other object. Even if you stop the first data reader and start the other but if the same db connection is used for the second, you will still get an error.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...