Hi!
I do not know. I used transactions only for duration of update, so I do not know all step-by-step locking actions that transaction does in process of updates/changes.
>Vlad,
>
>Thanks for your quick replys.
>
>Will Begin Transaction lock the table header immediatly under Optimistic Table locking? Or will it wait to lock the table header when a tableupdate is issued?
>
>Thanks,
>
>Mike
>
>
>>Hi!
>>
>>New record inserting requires changes in the table's header. As a result, BEGIN TRANSACTION in such case locks the table header, so other users would not be able to add new records.
>>
>>I still would not recommend to use transaction for so long time. This command designed to work as short as possible time, for only making real updates into table.
>>
>>>Well the reason I do it this way:
>>>
>>>The table has a unique key, and I issue an APPEND BLANK...
>>>
>>>I just changed the buffering to 5 (Table locking) and it worked ok...
>>>
>>>The orignal scenario has worked for 2 years, it worked up until Friday, and decided not to work this morning... Nothing has changed on the server...
>>>
>>>It just doesnt make sense.
>>>
>>>Thanks,
>>>
>>>Mike
>>>>Hi!
>>>>
>>>>The best scenario is much more complex.
>>>>BEGIN TRANSACTION should be issued only when you save:
>>>>
>>>>Begin transaction
>>>>do update
>>>>end transaction
>>>>
>>>>To avoid multi-user issues, use either pessimistic locking or checking for conflicts before saving.
>>>>
>>>>>I have an application with a table that has buffering set to 3 (Optimistic record lock). When a user is entering a new record I issue a "Begin Transaction" When he/she presses on the SAVE button I issue a "End Transaction", if he/she presses on the CANCEL button I issue a "Rollback".
>>>>>
>>>>>Until the user clicks on the SAVE/CANCEL button, it seems that the entire table is locked... No other user can do a thing... Move between records, update, insert or delete...
>>>>>
>>>>>Any ideas?
>>>>>
>>>>>Thanks in advance,
>>>>>
>>>>>Mike
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.