C
Chirag Shukla
Guys,
I didnt need multiple recordsets open in .NET until today and it seems
that only 1 datareader can be opened per connection. I think that is
really silly. Using SQL Server 2000 and VB.NET (and C#), I wanted to
upgrade an old, very stable VB application to Framework 1.1.
The deal is that RECORDSET1 scrolls through a group of rows and while
looping, does a few calculations. Under certain conditions, it needs to
get data from another table through RECORDSET2. It was way too simple
in ADO.
ADO
open rs -- loop ----- if result is funny, call another RS and seek data
before closing this RS -- complete the remaining processes ------- end
the loop and close the first rs
~ GetRows() was helpful in ADO ~
ADO.NET doesnt help much with datareader
open reader -- loop ------- if result is funny, call procedure that
opens another connection and another attached READER, seek data before
closing this READER and connection -- complete the remaining processes
-------- end the loop and close the first reader
Is there a better way than above to seek data from another recordset
while looping through the first recordset? Suggestions are welcome.
IDE: VS 2003, Framework 1.1 SP1
Thanks.
Chirag Shukla.
I didnt need multiple recordsets open in .NET until today and it seems
that only 1 datareader can be opened per connection. I think that is
really silly. Using SQL Server 2000 and VB.NET (and C#), I wanted to
upgrade an old, very stable VB application to Framework 1.1.
The deal is that RECORDSET1 scrolls through a group of rows and while
looping, does a few calculations. Under certain conditions, it needs to
get data from another table through RECORDSET2. It was way too simple
in ADO.
ADO
open rs -- loop ----- if result is funny, call another RS and seek data
before closing this RS -- complete the remaining processes ------- end
the loop and close the first rs
~ GetRows() was helpful in ADO ~
ADO.NET doesnt help much with datareader
open reader -- loop ------- if result is funny, call procedure that
opens another connection and another attached READER, seek data before
closing this READER and connection -- complete the remaining processes
-------- end the loop and close the first reader
Is there a better way than above to seek data from another recordset
while looping through the first recordset? Suggestions are welcome.
IDE: VS 2003, Framework 1.1 SP1
Thanks.
Chirag Shukla.