Solved

Stored Procedures

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

911 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

25 Experts available now in Live!

Get 1:1 Help Now