Solved

Stored Procedures

Posted on 2006-10-24
5
593 Views
Last Modified: 2012-05-05
Hi,
I have a stored procedure that correctly creates the adodb.command and makes the procedure run, however, in the procedure there is a select query that returns results. I would like to know how I can get these results.

like if the select returns 5 results from the database, how would i be able to get all 5 and not just one back? And is this defined as adParamOutput or adReturnValue? I'm not sure how to go about getting the data from a stored proc instead of the usual inputting.

Thanks!

Audrey-Rose
0
Comment
Question by:arvanhalleorg
  • 3
  • 2
5 Comments
 
LVL 29

Expert Comment

by:leonstryker
ID: 17798177
Audrey-Rose,

You would need to declare an ADO.Recordset object and return it that way. Here take a look at this tutorial:

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=12050&lngWId=1

Leon
0
 
LVL 2

Author Comment

by:arvanhalleorg
ID: 17798256
Uhm. Doesn't look like what I'm needing. Recordsets work perfectly fine if select is the only thing I'm doing. My problem is when its a stored procedure. This stored procedure takes variables that I've inputted as adParamInput, then the stored procedure does a select after the input data modifies the database, and gives out one or more results from the modified table.
0
 
LVL 29

Accepted Solution

by:
leonstryker earned 500 total points
ID: 17798302
No, Recordsets are exactly what you need. Here this maybe a better example:

http://www.4guysfromrolla.com/webtech/083101-1.shtml

Leon
0
 
LVL 2

Author Comment

by:arvanhalleorg
ID: 17798360
Yeah, We used an example we found in another question.

Thanks

0
 
LVL 29

Expert Comment

by:leonstryker
ID: 17798382
Thanks for the grade,

Leon
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now