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


Please Help Members By Posting Answers For Below Questions

Which provider is used to connect ms access, oracle, etc…?

724


Describe the disconnected architecture of ADO.NET’s data access model.

754


Define executenonquery?

692


What are the advantages of ado.net?

675


What is the difference between data reader and data adapter?

763


what is the difference betwen typed dataset and untyped dataset?in general which dataset can we use in programming?

739


What connected data?

683


Explain the difference between an ado.net dataset and an ado recordset?

760


How do you update a dataset in ado.net?

749


What is ado object model?

697


What is difference between Dataview and Datatable?

725


What is connection string?

710


How to create data relations?

724


What are ado.net objects?

712


What are the advantages of oledb compared with other classes?

2551