sqldatareader connection

  • Thread starter Miha Markic [MVP C#]
  • Start date
M

Miha Markic [MVP C#]

Hi,

z. f. said:
Hi,

why is this error exist?

there is already an open datareader associated with this connection which
must be closed first


does the reader running on a server side cursor ? can't it work in a
disconnected fashion?

Yes, reader is server side. Only one operation at the same time can be used
with connection.
Such an operation is using datareader.
If you want disconnected fashion then use dataadapter.Fill to fill a
datatable.
what should i do in order to run disconnected or when i want to make update
on each iteration of the reader, use data table?

Sure, either use the approach above or create another connection instance
for your updates.
 
Z

z. f.

Hi,

why is this error exist?

there is already an open datareader associated with this connection which
must be closed first


does the reader running on a server side cursor ? can't it work in a
disconnected fashion?

what should i do in order to run disconnected or when i want to make update
on each iteration of the reader, use data table?

why is it implemented this way?

TIA, z.
 

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