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

how we can fire event in databound coulm in datagfrid withot using button?

574


Explain the different row versions available in table?

552


What is ado oledb and odbc?

503


Why is ADO.NET serialization slower than ADO ?

569


Which object is used to add relationship between two Datatables?

579






What is a column variable?

505


Some important instruction regarding ADO.NET connection string ?

544


Explain how to call the sql commands asynchronously in ado.net version 2.0?

512


What is the namespaces being used to access oracle database?

519


How can I retrieve two tables of data at a time by using data reader? Data reader read and forward only, how is it possible to get 2 tables of data at a time?

522


Explain the difference in record set and dataset?

493


What are all the different authentication techniques used to connect to MS SQL Server?

546


What is an ado connection?

529


If we are not returning any records from the database, which method is to be used?

759


What is commandbuilder in ado.net?

526