Paradox Community

Items in pnews.paradox-programming

Subject:Re: Cancelling Tcursor Action
Date:Wed, 24 Jun 2020 20:56:51 -0800
From:Peter <>
After tc.insertRecord() and populating the fields I have

if not tc.unLockRecord() then

I was getting a Pdox err about keyviol and it showed Pdox choking on 

Thanks Tom

On 6/24/2020 8:20 PM, Tom Krieg wrote:
> if tc.isEdit() then
>     tc.cancelEdit()
> endif
> If your tc was updating an existing record then it will revert back to 
> the original contents. If the tc was  inserting a record, the record 
> will be discarded. UNLESS you issued a tc.postrecord which DID work then 
> you'll need to do a tc.deleterecord(). Presumably you're just testing a 
> tc.unlockrecord in which case a tc.cancelEdit() will handle it.
> On 25/06/2020 12:39 pm, Peter wrote:
>> If a tcursor fails (perhaps due to keyviol) what is the proper way to 
>> back out:
>> tc.deleteRecord()
>> or
>> tc.endEdit()
>> Thank you
>> Peter

Copyright © 2004