473,320 Members | 1,744 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Next recordset

I have sqlProcedure which returns 2 recordsets.

First recordset I put into sqldatareader:
SqlDataReader rdr;
SqlDataReader rdr1;

rdr = oCmd.ExecuteReader()

This works. But how can I get next recordset?

In past(ASP), I could use method rs.NextRecordset.
How this can be done in ado.net?

Something like:
rdr1=oCmd.MoveNextRecordset

regards,S
Jun 5 '06 #1
3 2331
The datareader has a NextResult() method.
simonZ wrote:
I have sqlProcedure which returns 2 recordsets.

First recordset I put into sqldatareader:
SqlDataReader rdr;
SqlDataReader rdr1;

rdr = oCmd.ExecuteReader()

This works. But how can I get next recordset?

In past(ASP), I could use method rs.NextRecordset.
How this can be done in ado.net?

Something like:
rdr1=oCmd.MoveNextRecordset

regards,S


Jun 5 '06 #2
Check my blog:
http://spaces.msn.com/sholliday/ 5/24/2006 entry

It has what you're looking for. and a complete downloadable example too.

The (IDataReader.NextResult();) is what you're looking for.

"simonZ" <si*********@studio-moderna.com> wrote in message
news:eD**************@TK2MSFTNGP05.phx.gbl...
I have sqlProcedure which returns 2 recordsets.

First recordset I put into sqldatareader:
SqlDataReader rdr;
SqlDataReader rdr1;

rdr = oCmd.ExecuteReader()

This works. But how can I get next recordset?

In past(ASP), I could use method rs.NextRecordset.
How this can be done in ado.net?

Something like:
rdr1=oCmd.MoveNextRecordset

regards,S

Jun 5 '06 #3

For some reason, my post didnt go through.

(IDataReader.NextResult();) is what you're looking for.
I have a complete example at:
http://spaces.msn.com/sholliday/ 5/24/2006 entry

it uses the NorthWind database, so its easy to download and run the example.

(The download link is near the bottom of the blog entry)


"sloan" <sl***@ipass.net> wrote in message
news:On**************@TK2MSFTNGP03.phx.gbl...
Jun 5 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Phillip J. Allen | last post by:
Hi all, I have a table with an “autonumber” primary key field that also acts as a foreign key in 2 other tables. I would like to programmatically add a new record to the first table and the...
2
by: Crimsonwingz | last post by:
Trying again for understanding and comprehension. Simple database. Name, birthday, age. Name and birthday are provided. From a form (yes, I need to do it this way), I would like to click a...
0
by: EiEiO | last post by:
Hello all. I am hoping I could get some suggestions on moving forward. My Challenge: Importing data from one table to another where the field names almost never match. My Form has a list...
3
by: dataeagle | last post by:
In the 'On open' event of a main form, I need to check the values of a nested subform (i.e. subform of a subform). I am able to pass the first value, and even though it goes through each time, it...
2
by: Arsalan Ahmad | last post by:
Hi, May be I am a newbie, or may be i dont have that much insight in following systems ..i.e. why i have some confusions as below: In many websites, when search is performed on some keywords...
11
by: scsTiger | last post by:
I am using Access 2000 as the front end and MS SQL 2000 as the backend. I have a one record form that I set using something like: strSQL = "SELECT * FROM dbo_WBACCT WHERE...
4
by: jqtimbang | last post by:
Hello everyone, Once again, I would like to ask help from VB experts here. My code here searches for a tollfree No in the access database. After finding the said no. I would like to search again...
4
by: tone | last post by:
Hi, need some help. Got table A with two columns: type DATE, VALUE Got table B with two columns: type DATE, VALUE Now the thing is to update table A with the values from table B. For each...
3
by: mbilalk | last post by:
Hello, Well here goes, I am using Microsoft Access to design a user interface for SQL Server database, I am currntly using the project method. I have manged to link it up and get my form to show...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.