Solved

Stored Procedures

Posted on 2006-10-24
5
595 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…

770 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