Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
lucasite
Starting Member
4 Posts |
Posted - 2005-06-13 : 08:55:09
|
Hi,a simple question. If I use Query Analyser under MS SQL, to execute a non query statement, i get the following message:Query: DELETE FROM CustomersResult: (10 records affected)Here's the code in VB.netDim c as new sqlcommand("DELETE FROM Customers",cnn)c.executenonqueryHow do I find out how many results were affected? |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-06-13 : 09:27:16
|
Create Stored Procedure having that query with output parameter.Set the last line of that sp as Select @Output=@@RowCountYou need to use Command object in .NET to retrieve output parameter value from Stored ProcedureMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|