ExecuteNonQuery returning -1

  • Thread starter Thread starter Winista
  • Start date Start date
W

Winista

I have a stored procedure that adds a new record in the database and have
another SP that updates a record. I used to call ExecuteNonQuery method on
command object and it used to return 1 if method executed sucessfully. This
was all fine and dandy in .Net1.1

Now in .Net 2.0 I use the same code and ExecureNonQuery returns -1 for both
command objects.

Any thing changed between 1.1 and 2.0 that I need to be aware of? This is
causing a lot of code to break.
 
Are you sure no one added 'set nocount on' in the stored procedures, or
something like that?

I think if you have a very simple reproduceable case with the stored
procedure and .NET code, that would help.
 
Back
Top