what do you do when logic just stops working  
Author Message
minim8g





PostPosted: Wed Mar 22 15:23:12 CST 2006 Top

SQL Server >> what do you do when logic just stops working

I have this stored procedure which was working fine yesterday but today no
matter what I do only returns -1. I even changed the procedure to select *
from some table and return 0 (I've tried 1 as well) but regardless of what
I do when I call ExecuteNonQuery I get back -1

Connection string is correct, names are correct everything should work but I
am at a total loss as to WTF is happening.

I'm lost.

SQL Server239  
 
 
David





PostPosted: Wed Mar 22 15:23:12 CST 2006 Top

SQL Server >> what do you do when logic just stops working


>I have this stored procedure which was working fine yesterday but today no
>matter what I do only returns -1. I even changed the procedure to select *
>from some table and return 0 (I've tried 1 as well) but regardless of what
>I do when I call ExecuteNonQuery I get back -1
>
> Connection string is correct, names are correct everything should work but
> I am at a total loss as to WTF is happening.
>
> I'm lost.
>
>


SqlCommand.ExecuteNonQuery Method
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.
http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.executenonquery.aspx

David