a Return(1) in a stored proc

  • Thread starter Thread starter David Lozzi
  • Start date Start date
D

David Lozzi

How is a Return(1) handled in asp.net? Do I need to specify an output? What do I call the output?
 
David said:
How is a Return(1) handled in asp.net? Do I need to specify an output?
What do I call the output?

--
David Lozzi
Web Applications/Network Specialist
Delphi Technology Solutions, Inc.
dlozzi(remove-this)@delphi-ts.com

You specify the direction as "ReturnValue", I don't know
if the name is important, maybe someone else?
 
David Lozzi said:
How is a Return(1) handled in asp.net? Do I need to specify an output?
What do I call the output?

You need to use a sqlcommand object. Something like this:

Dim cn As New SqlConnection(sConn)
Dim cmd = New SqlCommand("Procedure", cn)
Dim parm = New SqlParameter("@RETURN_VALUE", SqlDbType.Int, 4,
ParameterDirection.ReturnValue, False, 9, 0, "", DataRowVersion.Default, 0)
cmd.Parameters.Add(parm)

Bob Barrows
 
Back
Top