|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
ExecuteNonQuery returning -1I 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. Show quote "Winista" <naveenko***@hotmail.com> wrote in message news:OVcyeysUGHA.736@TK2MSFTNGP12.phx.gbl... >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. > |
|||||||||||||||||||||||