Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
|
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 10th, 2004, 11:58 PM
Registered User
 
Join Date: Feb 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to jaideepc
Default What happens if someone else updates the data

If 2 people edits the data in a dataset at the same time and updates the datasource, will the edit of the first person get overwritten.Please guide me.

 
Old August 11th, 2004, 07:41 AM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
Default

you can control such errors through both dataset(including datatable) and your dataadapter.
i.e you can control in your datatable object through GetErrors() methode...
this method supposes the user has finished the updating(in discconected enviroment)the rows and provides you with a datarow array that includes rows have some errors(even you can use this methode in your complex datasets)
(this I told doesnt have any connection with your problem!!!)
also you can control your errors while updating your datasource through Update()
method in DataAdapter object,it has two events,RowUpdating and RowUpdated...
RowUpdating occurs while updating your datasource but RowUpdated occurs after that
this two events have their argument and through them you can continue or stop updating your datasource according to probable errors
for example RowUpdating event gets an argument called RowUpdatingEventArgs,then you can use this and determine if there were errors(with Errors property) and.....
for more information have a look at MSDN.
HTH.

--------------------------------------------
Mehdi.:)
 
Old August 11th, 2004, 12:02 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hello,

Without any coding to see if the original values match what's in the database, by default yes, if both update at the same time, the data source should implement transactions where the first person accesses the table, then the second person does.

That's the transaction model. Is that what you wanted to know, or am I completely off?

Brian





Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible to manage data entry and updates th Bjay Pro VB Databases 0 July 22nd, 2007 04:49 PM
post data updates in database and posts back stealthasp Classic ASP Databases 11 February 20th, 2007 08:55 PM
Updates? GeekyMonkey BOOK: Professional Web Parts and Custom Controls ASP.NET ISBN: 0-7645-7860-X 12 May 24th, 2006 12:11 PM
Transactional UPDATEs djm2cmu BOOK: ASP.NET Website Programming Problem-Design-Solution 0 January 20th, 2004 11:42 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.