a Return(1) in a stored proc

Discussion in 'ASP .Net' started by David Lozzi, Feb 7, 2005.

  1. David Lozzi

    David Lozzi Guest

    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
     
    David Lozzi, Feb 7, 2005
    #1
    1. Advertising

  2. David Lozzi

    Hans Kesting Guest

    David Lozzi wrote:
    > 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?

    --
    Hans Kesting
     
    Hans Kesting, Feb 7, 2005
    #2
    1. Advertising

  3. "David Lozzi" <dlozzi@(remove-this)delphi-ts.com> wrote in message
    news:%...
    > 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

    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From header is
    my spam trap, so I don't check it very often. You will get a quicker
    response by posting to the newsgroup.
     
    Bob Barrows [MVP], Feb 7, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. smen
    Replies:
    3
    Views:
    11,383
    Scott Allen
    Jan 9, 2004
  2. hansiman
    Replies:
    0
    Views:
    503
    hansiman
    Feb 5, 2005
  3. David Lozzi
    Replies:
    3
    Views:
    1,972
    David Lozzi
    Jun 1, 2005
  4. Learner
    Replies:
    4
    Views:
    10,415
    bhawin13
    Dec 22, 2005
  5. raghav
    Replies:
    4
    Views:
    355
    raghav
    Nov 3, 2006
Loading...

Share This Page