a Return(1) in a stored proc

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?
 
H

Hans Kesting

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?
 
B

Bob Barrows [MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top