Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Stored Procedures

Posted on 2006-10-24
5
Medium Priority
?
601 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…
Suggested Courses

604 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