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 is the default timeout specified for "sqlcommand.commandtimeout" property?
What is command class in ado.net?
What is sqldatasource?
Which database is the ado.net sql connection object designed for?
What is data reader in ado.net?
What is meant by executenonquery?
Explain the difference between sqlcommand object and command behavior object?
What is linq and entity framework?
What are all the classes that are available in System.Data Namespace?
What are disadvantages of microsoft-provided data provider classes in ado.net?
How to maintain the relation between two tables in ADO.NET?
How to load multiple tables into a dataset?
How do I delete a row from a DataTable?
Explain ado.net features?
Why do we use sqldataadapter?