In my app from memory it was happening when the Post was occurring in the
table and an EConvert exception occurred (the date in a field wasn't in a
valid date format). When an exception occurs, code execution stops dead (I
think). Then it would seem if you have a lock already placed on a table from
editing, that lock doesn't get released as it should when you post. What you
could try doing is to recover from the exception and either carry on with
the post or try calling the Cancel method to undo the post (this will also
however undo changes to the record)

>From recollection I wrote a PostTables procedure that traps all the
exceptions and also returns FALSE to my calling routines if an exception
occurred and then the attempt to post is abandoned and the user sees an
error message. The user is then left with the option of correcting the
problem before another post is attempted.

============================================
Patrick Dunford, Christchurch, NZ
http://patrick.dunford.com/

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Darren J Gilbertson
> Sent: Wednesday, 24 November 1999 09:59
> To: Multiple recipients of list database
> Subject: [DUG-DB]: record already locked by this session
>
>
> In a database application I keep getting the following error:
>
> record already locked by this session
>
> How can I get rid of this?
>
>
> Darren
> ------------------------------------------------------------------
> ---------
>   New Zealand Delphi Users group - Database List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
>

---------------------------------------------------------------------------
  New Zealand Delphi Users group - Database List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to