about Sqldataadapter

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
 
T

Tony

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

//Tony
 
J

Jeff Johnson

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.
 

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

Similar Threads


Top