473,405 Members | 2,444 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,405 software developers and data experts.

Multiple recordset from a stored procedure

Hi,
using vb.net/sql server 2000 migrating an app from asp to asp.net. I have a
stored procedure that returns 3 recordsets. In asp to move to the next
recordset I'd just do
<%
set rs = rs.nextrecordset
' display data
set rs = rs.nextrecordset
' display data
'etc

Is there an equivalant to this in asp.net? I can get the first recordset
fine just don't know how to move to the 2nd and 3rd

Cheers,
Jon
Nov 18 '05 #1
3 2213
If you are using a DataReader type object, use the NextResult method.
If you are using Fill on a DataSet, all the resultsets will be filled
into DataTables of the DataSet.

HTH,

--
Scott
http://www.OdeToCode.com
On Sat, 31 Jan 2004 14:58:30 -0000, "Jon Spivey"
<jo*******@NOCRAPTHANKStiscali.co.uk> wrote:
Hi,
using vb.net/sql server 2000 migrating an app from asp to asp.net. I have a
stored procedure that returns 3 recordsets. In asp to move to the next
recordset I'd just do
<%
set rs = rs.nextrecordset
' display data
set rs = rs.nextrecordset
' display data
'etc

Is there an equivalant to this in asp.net? I can get the first recordset
fine just don't know how to move to the 2nd and 3rd

Cheers,
Jon


Nov 18 '05 #2
e.g. recordset1 in ds.Tables[0], recordset2 in ds.Tables[1] and so on...

Tiendq,
ti**@tienonsoftware.com

"Scott Allen" <bitmask@[nospam].fred.net> wrote in message
news:ep********************************@4ax.com...
If you are using a DataReader type object, use the NextResult method.
If you are using Fill on a DataSet, all the resultsets will be filled
into DataTables of the DataSet.

HTH,

--
Scott
http://www.OdeToCode.com
On Sat, 31 Jan 2004 14:58:30 -0000, "Jon Spivey"
<jo*******@NOCRAPTHANKStiscali.co.uk> wrote:
Hi,
using vb.net/sql server 2000 migrating an app from asp to asp.net. I have astored procedure that returns 3 recordsets. In asp to move to the next
recordset I'd just do
<%
set rs = rs.nextrecordset
' display data
set rs = rs.nextrecordset
' display data
'etc

Is there an equivalant to this in asp.net? I can get the first recordset
fine just don't know how to move to the 2nd and 3rd

Cheers,
Jon

Nov 18 '05 #3
got it - thanks

Jon

"Do Quyet Tien" <dq****@cmc.com.vn> wrote in message
news:OB**************@TK2MSFTNGP11.phx.gbl...
e.g. recordset1 in ds.Tables[0], recordset2 in ds.Tables[1] and so on...

Tiendq,
ti**@tienonsoftware.com

"Scott Allen" <bitmask@[nospam].fred.net> wrote in message
news:ep********************************@4ax.com...
If you are using a DataReader type object, use the NextResult method.
If you are using Fill on a DataSet, all the resultsets will be filled
into DataTables of the DataSet.

HTH,

--
Scott
http://www.OdeToCode.com
On Sat, 31 Jan 2004 14:58:30 -0000, "Jon Spivey"
<jo*******@NOCRAPTHANKStiscali.co.uk> wrote:
Hi,
using vb.net/sql server 2000 migrating an app from asp to asp.net. I have
a
stored procedure that returns 3 recordsets. In asp to move to the next
recordset I'd just do
<%
set rs = rs.nextrecordset
' display data
set rs = rs.nextrecordset
' display data
'etc

Is there an equivalant to this in asp.net? I can get the first

recordsetfine just don't know how to move to the 2nd and 3rd

Cheers,
Jon


Nov 18 '05 #4

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

Similar topics

5
by: Bruno Alexandre | last post by:
Hi guys, withou using SP, I want to be able to add a Parameter to the SQL Query and retrive the Recordset so I can use the Paging property under the recorset object.... how can I do this? I'm...
4
by: Tom | last post by:
I want to open a recordset object on an .asp page. When I open the recordset I would like to use a stored procedure that expects a parameter to be passed for the stored procedure. I will then use...
12
by: Scott | last post by:
Front-end Access 2000 I have a stored procedure that has 2 parameters BusinessUnitID and Year. It returns multiple record sets (5 to be exact). I thought I could use a Pass through query but...
1
by: Lyle Fairfield | last post by:
MS-SQL 2000, Access 2003, ADO 2.8 Please, consider the SQL string in the following code: Dim r As ADODB.Recordset Dim r2 As ADODB.Recordset Set r = CurrentProject.Connection.Execute( _ "SET...
16
by: Randy Harris | last post by:
I was inspired by the recent discussion of returning multiple recordsets to ADO from a stored procedure. (Amazed is probably more accurate). I asked about how to accomplish same with Oracle and...
3
by: Suresh | last post by:
Hi All I am writing Import\Export routine in DB2 using stored procedure and front end as JAVA. For this I have two option 1) Writing five different stored procedure returning one cursor...
5
by: Wael | last post by:
Hi, I have the following stored procedure that does some processing and puts the result in a temporary table. I tried several things that procedure to display output that I can access with...
1
by: stjulian | last post by:
I have a stored procedure which returns 2 tables and 1 output value. I want the first table to be assigned to rs1 and the second to rs2. However when I run this, I get the following error as I...
4
by: =?Utf-8?B?TWFkaXNvbg==?= | last post by:
Hi all, Could I use the sqldatasource with stored-procedure to return multiple recordset? I did not want to have any sqldatasourec in the one page just to return the record back to...
3
by: Dooza | last post by:
Hi there, I have a Stored Procedure in SQL 2000 that takes 10 input paremeters, and outputs 11 recordsets, not rows, but 11 different SELECT statements. The purpose of this is to for a menu...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.