Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS Data Access Application Block w/ SP output params 1

Status
Not open for further replies.

LNBruno

Programmer
Joined
Jan 14, 2004
Messages
936
Location
US
Using VS2003 for a winforms app and using the MS DAAB. First time I've come up on using SQL Server 2000 stored procedures that return output parameters and not really sure how to proceed.

Anybody "been there, done that" and can offer assistance?

Thanks!

< M!ke >
 
This MSDN page tells exactly how to do this with command parameters.

Input and Output Parameters, and Return Values

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson
 
Thanks for the reply, but the page you indicate doesn't use the Data Access Application block.





< M!ke >
 
From what I can determine, you get Output parameters in the DAAB in the same manner as in the link in my post. When you add parameters to be passed to the stored procedure, you can specify the direction of the parameter as either ParameterDirection.Input or ParameterDirection.Output. For the parameters you wish to return an output parameter from the stored proc, you must specify the Direction as ParameterDirection.Output.

Here's a couple of links that detail how to do this, but the code is in C#:

[URL unfurl="true"]http://www.codeput.com/article.aspx?id=10005[/url]

[URL unfurl="true"]http://www.codeguru.com/csharp/csharp/cs_data/cachingandpeformance/article.php/c10635__2/[/url]

And here's on that has some VB code:

[URL unfurl="true"]http://www.dotnetjunkies.com/Forums/ShowPost.aspx?PostID=6236[/url]

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson
 
Thanks again. Appreciate the extra links. I can decypher "Sea Pound" into a real development language so that's okay (JK!!!).

I kinda picked up on the ParameterDirection.Output as a piece of the puzzle earlier, but had my own personal direction re-routed!

Just a quick glance at the links make sense, esp. that VB one (JK again!!!).

I'll follow up.

Happy St. Patty's!

< M!ke >
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top