473,769 Members | 4,173 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Multiple Recordset from a Stored Procedure

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 that only returns the
first record set.
I thought I could use ADO but that does not seem to work. I get an
Error

When I change the SQL from SQL = "procIPCRep ort " & i & ", " &
txtYear.Value
To
SQL = "select * FROM tblBudget

It opens and works

The reason I cannot use multiple calls to the database is the last 4
record sets are generated from the information in the first record set.
The procedure can take 5 minutes to generate results so going back to
the server is not an option.

So my question is I need either 5 different record sets or 1 record set
containing multiple record sets

How should I accomplish this?

Dec 7 '05
12 17661

So you'll pop back in about 20 years and let us know how your research went
then ?

<BG>

--
Terry Kreft

"Randy Harris" <ra***@SpamFree .com> wrote in message
news:Gs******** **********@news svr14.news.prod igy.com...

"Terry Kreft" <te*********@mp s.co.uk> wrote in message
news:eu******** ************@ka roo.co.uk...
I'm sorry but I don't.

I wouild have thought a search on something like "Oracle Multiple
Recordsets" would return some results.
--
Terry Kreft


Thanks very much Terry. I searched on that very phrase (43,000 hits).

Randy Harris

Dec 9 '05 #11
I know zip about Oracle and zip + 1 / infinity about multiple
recordsets but I am so interested that I couldn't resist the search
myself:

I came upon:
http://www.oracle.com/technology/sam...db8/index.html
Returning multiple recordsets from a stored procedure[13-Mar-2003]
This sample shows how to return multiple recordsets from database
stored procedure using ActiveX Data Objects (ADO) with VB
Download Now (ZIP, 103KB)

Also I note that ADO help suggests that we can roll our own multiple
recordset returning command as:
"If you open a Recordset object based on a compound command statement
(for example, "SELECT * FROM table1;SELECT * FROM table2") using the
Execute method on a Command or the Open method on a Recordset, ADO
executes only the first command and returns the results to recordset.
To access the results of subsequent commands in the statement, call the
NextRecordset method."

And I experimented with MS-SQL as follows:

Dim r As ADODB.Recordset
Dim r2 As ADODB.Recordset
Set r = CurrentProject. Connection.Exec ute( _
"SET NOCOUNT ON " _
& "SELECT * FROM FFDBATransactio ns " _
& "COMPUTE AVG(TotalAmount )")
Set r2 = r.NextRecordset
Debug.Print r.GetString(adC lipString, 1, vbTab, vbNewLine)
Debug.Print r2.GetString(ad ClipString, 1, vbTab, vbNewLine)
Set r = Nothing
which gives:

1 2004-01-01 Carryover from 2003 7290.07 17 1 11

591.5508

And I'm going to ask a question about multiple recordsets and no count
in a separate thread.

Dec 9 '05 #12

"Terry Kreft" <te*********@mp s.co.uk> wrote in message
news:_b******** ************@ka roo.co.uk...

So you'll pop back in about 20 years and let us know how your research went then ?

<BG>

--
Terry Kreft


I downloaded some sample code from Oracle. So far I haven't gotten it
working (OLEDB driver issue), but I hope to. I'll report back as soon as
I've got something working.

Randy

Dec 9 '05 #13

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

Similar topics

2
1511
by: sbw | last post by:
Hi. I have an app which uses multiple databases and I would like to know if there is a way to connect to different databases through OLEdb (or any other connection string) which allows me to connect to a different database. My connection string connects to HelpDesk db. For example
5
1722
by: Eugene Anthony | last post by:
I have created the following stored procedure whereby it will check whether the categoryID is valid and if it is then the updation will be performed, else a -1 will be returned. This procedure will be execute with asp. Is this considered to be efficient?. create procedure usp_updateCategories @CategoryID int @CategoryDescription varchar(30), @ParentCategoryID int
2
11709
by: Josh Strickland | last post by:
I am attempting to create an Access database which uses forms to enter data. The issue I am having is returning the query results from the Stored Procedure back in to the Access Form. tCetecM1CUST (SQL Table that contains the Customer Information) tAccountingDetail (SQL Table that contains the information in the form) frmAccountingEntry (Access form used to enter data) spGetCustomerInformation (Stored Procedure which returns data using...
3
5819
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 (recordset each) 2) Writing one stored procedure returning five different cursor (five
0
1207
by: Hades5k | last post by:
Hello everyone, I'm working a project using MS Project 2003 database. What I need to do is to get all entries for a specific user, from a specific project with specific citerias. Its a web application, made with C#. As it is right now, we're doing multiple queries with Data readers and DataTable, filtering those tables to fill new tables to achieve our goal. But the process takes about 13 sec to complete which is way too long. So I...
1
11319
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 begin to refer to the rs2 recordset (Do while not rs2.eof). I have even used 2 ".execute" statements in the code below, but the code assigns the first recordset twice. Microsoft VBScript runtime error '800a01a8' Object required: 'rs2' ...
6
6619
by: binky | last post by:
Hi folks, I'm just learning how to use MS Access as a front end for SQL Server, and have a question: I have a stored procedure that returns a set of records from a SQL Server and loads it into a form in my Access application. This works as intended, but I'm having trouble trying to figure out how to modify records on the form... whenever I try i get the error that says youc an't modify this data because its based on an expression. i'm...
3
10042
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 system in a store. If all the inputs are NULL, then just the top level categories are output in the first recordset. The ID of each category will then be passed back into the stored procedure where it then filters the second recordset to create the...
6
3486
by: SethM | last post by:
I have a stored procedure that returns a record set. I want to functionalize this so I can have multiple presentations of the same record set. However, I can not get rs_event.open StoreProc to pass through the function, so I can use rs_event("Title"), etc, etc. Is this possible to do? If so how? Thanks. Regards, Seth
0
9589
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10211
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10045
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8872
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3959
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3562
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.