that is why it is verry important to close the datareader object if you are
ready with it to make the connection availlable again
in fact you can`t issue anny other commands on a connection while a
datareader object is active on that connection the only command you can
perform on a connection actively serving a datareader is the Close method
simular thing is also possible with SQL 2000 ( multiple resultsets ) by
just writing stored procedures and seperating the sql with a ; now with the
datareader you can use next result to get the folowing resultset
However still....... executing multiple data readers on one connection is
not possible why would someone use a datareader instead of a dataset /
datatable ? well the speed ...as a datareader is much faster if you are
only retrieving data for display purposes .
So the answer is NO you can`t use multiple data readers on a connection ,
however there are workarounds
1. go to a disconected architecture ( much slower )
2. create the datareader`s on there own connection object ( requires some
extra coding from your side )
3. use multiple resultsets
etc etc
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.