Groups | Blog | Home
all groups > vb.net data > january 2007 >

vb.net data : Retrieving an outpuit paramater from a stored procedure..


Brad Pears
1/23/2007 4:35:58 PM
In my vb.net 2005 project, I run a stored procedure on our SQL Server 2000
database.

In this stored procedure, I have defined an output parameter.

I want to then use this output parameter in my vb code. How do I access this
output parameter in code?

Thanks,
Brad

William (Bill) Vaughn
1/24/2007 8:21:48 AM
Create a Parameters collection that manages the parameters sent to (and
received from) the SP. The OUTPUT Parameter is marked with a specific
Direction property. Once the query is executed and all of the rows
retrieved, you can access that same Parameter.Value to retrieve the value.
See Chapter 10.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------

[quoted text, click to view]

Brad Pears
1/26/2007 5:07:16 PM
Great! Thanks for that...

brad
[quoted text, click to view]

AddThis Social Bookmark Button