Re: multiple DataReaders



because I have a couple scenarios:
1- I'm in a recursive function that opens a connection , issues a Reader
within a loop... also with in the loop it calls itself... like walking a
tree, but subsequence queries depend on the prior query results... I have
many branches, each branch causes more depth checking...
2-2nd is more like:
create connection
issue reader1
while Read()
get data out of record
.....
issue another Reader2 <different query string, different table>< this is
where it does not like me doing this>
while read()
...........
wend
Wend

"William (Bill) Vaughn" wrote:

> Sure, it's possible--just open more connections. Until ADO 2.0 and MARS you
> won't be able to run more than one operation on a Connection at any one
> time.
> The real question is, why do you need multiple DataReaders in the first
> place?
>
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> www.betav.com/blog/billva
> www.betav.com
> Please reply only to the newsgroup so that others can benefit.
> This posting is provided "AS IS" with no warranties, and confers no rights.
> __________________________________
>
> "JohnK" <JohnK@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:D9AE477D-80AB-4A12-A418-FF6D0A7F8C77@xxxxxxxxxxxxxxxx
> >I have a need to have multiple DataReaders active at the same time.
> > Also at times, I would like to have a recursive function with a DataReader
> > in...which basically means having multiple DataReaders active .....
> >
> > Is there a way to do this?
> >
> > John
>
>
>
.



Relevant Pages

  • Re: TCP listener
    ... This loop is required because of the main purpose of the program I am trying ... I am using the push server product's .Net sample and trying to modify it ... that it only works untill I close connection to the c# listener. ... private volatile bool monitorPort = true; ...
    (microsoft.public.dotnet.languages.csharp)
  • SSIS - Error Messages when looping through Excel Files
    ... What's the trick to use a Foreach File in Folder loop when looping through ... Now if I have my XL Connection manager set to a specific file, ...
    (microsoft.public.sqlserver.dts)
  • Re: Cache Issues
    ... When you close the reader then, ... >so I would open the connection, do whatever I had to do, use that same ... >"opens" and "closes". ... >that I'll have to change all my data access methods to use DataSets insted. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Changing connection information on OLEDB connection
    ... What I would do is set a breakpoint on the "On Each Iteration Of The Loop" event. ... I would then set a watch on the variable to make sure that the connection string is being set properly. ... When I run the package, I just get the first server's data twice, it ... but the second loop around it doesn't seem to be working. ...
    (microsoft.public.sqlserver.dts)
  • Re: Changing connection information on OLEDB connection
    ... Sybase OLEDB datasources, it seems to cache one connection so, even ... Loop" event. ... but the second loop around it doesn't seem to be working. ...
    (microsoft.public.sqlserver.dts)