Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Waiting on Stored Procedures

Reply
Thread Tools

Waiting on Stored Procedures

 
 
Matt
Guest
Posts: n/a
 
      07-18-2003
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
 
Reply With Quote
 
 
 
 
Ravikanth[MVP]
Guest
Posts: n/a
 
      07-18-2003
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
>.
>

 
Reply With Quote
 
 
 
 
Gary Varga
Guest
Posts: n/a
 
      07-18-2003
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
>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Debugging SQL Server 2000 Stored Procedures. lhak ASP .Net 1 10-23-2004 03:30 PM
Putting stored procedures in a dll Soumitra Banerjee ASP .Net 1 02-27-2004 01:46 AM
VB.NET Retrieving Identity form MSSQL2000 without using stored procedures Taras ASP .Net 2 10-05-2003 05:35 AM
Re: Your opinion about stored procedures Ray Dixon [MVP] ASP .Net 1 07-26-2003 08:23 AM
Re: Your opinion about stored procedures mono ASP .Net 1 07-04-2003 07:55 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57