about Sqldataadapter

  • Thread starter Thread starter Tony
  • Start date Start date
T

Tony

Hello!

According to a book that I'm reading it says.
"The SqlDataAdapter determines the number of records affected by executing
the query and throws a DBConcurrencyException if the query did not modify
any rows. If the database does not report how many record were affected by
the query (reporting -1 instead) the SqlDataAdapter still assumes success."

Now to my question how is it possible that the SqlDataAdapter can return -1
?
I have tried to google for SqlDataAdapter returning -1 but haven't find any
answers.

//Tony
 
But then I don't understand. What is the difference if the SqlDataAdapter
return -1 or 0 ?

//Tony
 
According to a book that I'm reading it says.
"The SqlDataAdapter determines the number of records affected by executing
the query and throws a DBConcurrencyException if the query did not modify
any rows. If the database does not report how many record were affected by
the query (reporting -1 instead) the SqlDataAdapter still assumes
success."

Now to my question how is it possible that the SqlDataAdapter can
return -1
?
I have tried to google for SqlDataAdapter returning -1 but haven't find
any
answers.

The way I read what you wrote does not suggest that the SqlDataAdapter
returns -1 to YOU, but that the DATABASE returns -1 to the SqlDataAdapter.
What the SqlDataAdapter passes on to you I wouldn't know.
 
Back
Top