Hi,
Check the advanced settings while generating the dataset.
-Zsolt
"Young" <(E-Mail Removed)> az alábbiakat írta a következo üzenetben
news:(E-Mail Removed)...
> Thanks.
>
> Can you please tell me how I can turn off optimistic concurrency?
>
> Young
>
> "miher" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>>
>>
>> "Young" <(E-Mail Removed)> az alábbiakat írta a következő üzenetben
>> news:4a24e252$(E-Mail Removed)...
>>> I get this exception when I try to update a record that has just been
>>> updated by another user.
>>>
>>> Here's the sequence of action.
>>> 1) I open the record for edit. Another user does the same.
>>> 2) The other user make his/her changes and save the record.
>>> 3) After I make my changes and save the record, I get this error.
>>>
>>> Is there a way to just overwrite this without throwing an exception?
>>>
>>> I used the dataadapter for my update.
>>>
>>> I also get the same error when the record has been deleted by another
>>> user. But this is ok.
>>>
>>> TIA
>>> Young
>>
>>
>> Hi,
>> This exception comes if the number of updated/inserted/deleted rows was
>> 0. This can happen if the used update/insert/delete statements were auto
>> generated by visual studio while the "Use optimistic concurrency" was
>> turned on (that is the default). In that case the generated statements
>> where clause contains not only the primary key as selector but all
>> columns too with the original values. This means that the where clause
>> will be true for the given record only if the record is the same as it
>> was when it got read into the dataset. The easiest way to turn this off
>> is to disable the optimistic concurrency option when auto generating the
>> update/insert/delete statements.
>> Hope i understood Your problem correctly.
>>
>> -Zsolt
>>
>>
|