ExecuteNonQuery returning -1

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.
 
M

Marina Levit [MVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top