Cor Ligthert [MVP]
3/9/2008 5:27:00 PM
John,
As you have a concurrency violation (you can see that with a standard
dataadapter update on the returned errorstate of a datarow), then you have
some possibilites, however the first one is to show it to the user.
And then you can tell him to do it over again after you have got the new
values from the database.
You can show the new values and ask if it should be replaced by the just
typed ones and do that like this.
However all is up to you, don't think that this will happen often,
concurrency errors should be in most situations rare.
Cor
"John" <John@nospam.infovis.co.uk> schreef in bericht
news:%23xOn7EggIHA.4140@TK2MSFTNGP04.phx.gbl...
> Hi Steve
>
> I know this much. I am looking to see how a detail-master app works
> specially in terms of multi-user issues like concurrency violation
> handling. It would be nice to see how a pro handles various real issues in
> a working db app.
>
> Thanks
>
> Regards
>
> "Steve Gerrard" <mynamehere@comcast.net> wrote in message
> news:WoKdnVuKf_F5lUnanZ2dnUVZ_uSgnZ2d@comcast.com...
>> It seems to me that just running one of the gee-wizards to create a
>> dataset and tableadapter would tell you enough. Drag and drop, and click
>> generate, and you can see how MS sets up an update query to update the
>> Authors table in Biblio.mdb.
>>
>> The strategy used is to pass the old value of every column as a
>> parameter, along with the new value of every column as a parameter. It
>> then constructs a Where clause in the SQL that checks that every old
>> value is still there, or still null as the case may be. That means the
>> update will only update if the underlying data has not changed in the
>> meantime.
>>
>> It is too awkward looking for my taste, I prefer using timestamps to keep
>> track of what has changed; but it is one way of getting it done.
>>
>>
>> John wrote:
>>> Cor, anything that can get me started at a reasonably sane level is
>>> fine. I am not looking for all possible ways to do things just any
>>> one way that does it good enough.
>>>
>>> Thanks
>>>
>>> Regards
>>>
>>>
>>> "Cor Ligthert[MVP]" <notmyfirstname@planet.nl> wrote in message
>>> news:BAF8329E-81E8-4590-838A-8F73C9F4E252@microsoft.com...
>>>> John,
>>>>
>>>> For what you ask is no standard solution, the way it can be done has
>>>> endless possibilities.
>>>>
>>>> A search for a good one which fits in your situation will be a lot
>>>> in the lottery.
>>>>
>>>> You have to do it yourself, with first writing down what your policy
>>>> will be at a concurrency error.
>>>>
>>>> Cor
>>>>
>>>> "John" <John@nospam.infovis.co.uk> schreef in bericht
>>>> news:O92Jc0VgIHA.4684@TK2MSFTNGP06.phx.gbl...
>>>>> Hi
>>>>>
>>>>> I am looking for a sample master-detail database winform
>>>>> application that handles multi-user issues like concurrency
>>>>> violations to inspect its code for good db development practices.
>>>>> Would appreciate link to any such app. Many Thanks
>>>>>
>>>>> Regards
>>
>>
>
>