By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,016 Members | 1,241 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,016 IT Pros & Developers. It's quick & easy.

return value from stored proc using MS Data Access Application Block

P: n/a
How do I read a stored proc return value ( return(@return_value) )
using MS Data Access Application Block.

Normally I use:

Dim conn As SqlConnection = New
Dim cmd As SqlCommand = New SqlCommand
cmd.Connection = conn
cmd.CommandText = "NameOfStoredProc"
cmd.CommandType = CommandType.StoredProcedure

cmd.Parameters.Add("@Param1", SqlDbType.Int)
cmd.Parameters("@Param1").Value = [value]

Dim retParam As SqlParameter =
cmd.Parameters.Add("@return_value", SqlDbType.Int)
retParam.Direction = ParameterDirection.ReturnValue


[local var] = retParam.Value

I figure I must use SqlHelper.ExecuteScalar... but can't find out how!

Please help


Nov 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.