?
Solved

Stored Procedures

Posted on 2006-10-24
5
Medium Priority
?
600 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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 …
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month15 days, 2 hours left to enroll

771 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