Hello, if I do it in your way I get an exception that User A has changed the data before and I have to let User B to decide what to to - this is not what I want. User B should not be allowed to enter the data in edit mode since user a is in edit mode at the moment.
Sven "Dean Harding" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Sven wrote: >> Hello, >> I will start to develop a multi user windows forms application with >> firebird >> as database and visual studio 2005 as development system. >> I use datasets in my application and have problems when multiple users >> change data in database. >> My question is: >> how do you handle the dataset problem? > > You mean if user A and user B load the data set and the same time, the > user A modifies one row and commits, then user B modifies a different > row and commits user B overwrites user A's changes? > > .NET already has a mechanism to handle that. The steps are, basically: > > 1. Build and fill a DataSet with data from a data source using a > FbDataAdapter. > 2. Change the data in individual DataTable objects by adding, updating, > or deleting DataRow objects. > 3. Call DataSet.GetChanges to create a second DataSet that features only > the changes to the data. > 4. Call the Update method of the FbDataAdapter, passing the second > DataSet as an argument. > > Check out the documentation for the DataAdapter class (which > FbDataAdapter inherits from) for more information. > > Dean. > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the > world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Firebird-net-provider mailing list > Firebird-net-provider@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider