Data Reader Error

G

Guest

Dear All,

I am using two datareaders with one connection and geting the following
error:

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

Should I use 2 connections with 2 separate datareaders.Or can I use 2
datareaders with one connection

Any help much appreciated.
 
M

Marina

As you can see by the error message, you cannot have 2 open data readers on
the same connection. So your options are to close the first before opening
the second, or to use 2 connections. Either that, or switch to using
datasets/datatables for one or both of your readers.
 

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

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,678
Members
48,796
Latest member
Greg L.

Latest Threads

Top