Waiting on Stored Procedures

Discussion in 'ASP .Net' started by Matt, Jul 18, 2003.

  1. Matt

    Matt Guest

    We are creating an ASP.NET application where I would like to call a
    SQL Server 2000 stored procedure and have the application wait until
    the procedure is done to proceed. The stored procedure is performing
    an INSERT statement and isn't returning a recordset. I'm looking for
    any suggestions on how this could be done.

    Thanks
     
    Matt, Jul 18, 2003
    #1
    1. Advertising

  2. Hi

    You can use the ExecuteNonQuery which Executes a Transact-
    SQL statement against the connection and returns the
    number of rows affected

    For UPDATE, INSERT, and DELETE statements, the return
    value is the number of rows affected by the command. For
    all other types of statements, the return value is -1. If
    a rollback occurs, the return value is also -1.



    HTH
    Ravikanth


    >-----Original Message-----
    >We are creating an ASP.NET application where I would

    like to call a
    >SQL Server 2000 stored procedure and have the

    application wait until
    >the procedure is done to proceed. The stored procedure

    is performing
    >an INSERT statement and isn't returning a recordset.

    I'm looking for
    >any suggestions on how this could be done.
    >
    >Thanks
    >.
    >
     
    Ravikanth[MVP], Jul 18, 2003
    #2
    1. Advertising

  3. Matt

    Gary Varga Guest

    Use the ExecuteNonQuery method on the Command.

    >-----Original Message-----
    >We are creating an ASP.NET application where I would

    like to call a
    >SQL Server 2000 stored procedure and have the

    application wait until
    >the procedure is done to proceed. The stored procedure

    is performing
    >an INSERT statement and isn't returning a recordset.

    I'm looking for
    >any suggestions on how this could be done.
    >
    >Thanks
    >.
    >
     
    Gary Varga, Jul 18, 2003
    #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. Taras
    Replies:
    2
    Views:
    4,840
    Rick Spiewak
    Oct 5, 2003
  2. Soumitra Banerjee

    Putting stored procedures in a dll

    Soumitra Banerjee, Feb 27, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    416
    Soumitra Banerjee
    Feb 27, 2004
  3. lhak
    Replies:
    1
    Views:
    5,467
    √Čric Moreau [VB MVP]
    Oct 23, 2004
  4. mono
    Replies:
    1
    Views:
    339
    David Waz...
    Jul 4, 2003
  5. Ray Dixon [MVP]

    Re: Your opinion about stored procedures

    Ray Dixon [MVP], Jul 25, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    390
    Peter Gossmann
    Jul 26, 2003
Loading...

Share This Page