Return Value from Stored procedure

Discussion in 'ASP .Net' started by bbawa1@yahoo.com, Jun 19, 2007.

  1. Guest

    I have a stored procedure which is returning an int. Could you
    pleasde give me ADO.Net code that how can I retrieve the returning
    value from from stored procedure in aspx page and put that returning
    value in a variable.

    Thanks
     
    , Jun 19, 2007
    #1
    1. Advertising

  2. Mark Rae Guest

    <> wrote in message
    news:...

    >I have a stored procedure which is returning an int. Could you
    > pleasde give me ADO.Net code that how can I retrieve the returning
    > value from from stored procedure in aspx page and put that returning
    > value in a variable.


    There's something wrong with your newsreader - it' just posted this in a new
    thread...


    --
    http://www.markrae.net
     
    Mark Rae, Jun 19, 2007
    #2
    1. Advertising

  3. SqlComand comm = new SqlCommand(connection);
    comm.Text = @"

    declare @res int
    execute @res = spYouStoredProcedure @YourParameter = <yourvalue>
    select @res"
    );
    int res = comm.ExecuteScalar();



    > I have a stored procedure which is returning an int. Could you
    > pleasde give me ADO.Net code that how can I retrieve the returning
    > value from from stored procedure in aspx page and put that returning
    > value in a variable.
    >
    > Thanks
    >
     
    Yuriy Solodkyy, Jun 19, 2007
    #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. Neo Chou
    Replies:
    1
    Views:
    787
  2. Paul
    Replies:
    1
    Views:
    383
    =?Utf-8?B?UmFtaXJvIENhbGRlcm9u?=
    Jan 19, 2004
  3. Nick
    Replies:
    8
    Views:
    3,277
  4. philip
    Replies:
    2
    Views:
    11,581
    bruce barker \(sqlwork.com\)
    Aug 10, 2006
  5. =?Utf-8?B?QmlzaG95?=
    Replies:
    1
    Views:
    313
    Mark Fitzpatrick
    Dec 24, 2006
Loading...

Share This Page