How do u implement locking concept for dataset?
Answer Posted / ananthi.r
When we update , the DataSet helps out with the process,
because it keeps track of multiple versions of rows that
have been updated. You can use parameters to set the
CommandText property of DataAdapter's UpdateCommand. The
SqlParameter class contains a property, called RowVersion,
that informs the DataSet which version of the value to make
use of. The DataAdapter judges whether the update worked by
considering whether the UPDATE statement have an effect on
zero or a non-zero number of rows. If someone else has
changed design (or deleted the row), the UPDATE returns "0
rows affected." If no one else touched the row (that is,
your optimism was justified), you receive "1 row affected."
| Is This Answer Correct ? | 5 Yes | 2 No |
Post New Answer View All Answers
What are the pre-requisites for connection pooling?
What is concurrency? How will you avoid concurrency when dealing with dataset? (One user deleted one row after that another user through his dataset was trying to update same row. What will happen? How will you avoid the problem?)
What is the difference between Data adaptor and Data set?
How would you connect to a database by using .NET?
What is ambient transaction?
What is ado rdo dao in visual basic?
If we are not returning any records from the database, which method is to be used?
Explain the role of data provider in ado.net? What is the role of data provider in ado.net?
What are good ado.net object to replace to ado recordset object.
Is entity framework better than ado.net?
What does adodb stand for?
What is a data control clerk?
What is ole db and odbc?
differance between ADO vs ADO.Net?
How does entity framework work?