Paradox Community

Items in pnews.paradox-programming

Subject:Re: Cancelling Tcursor Action
Date:Thu, 25 Jun 2020 15:15:38 +1000
From:Tom Krieg <REMOVEtomkCAPITALS@sdassociates.com.au>
Newsgroups:pnews.paradox-programming
That would happen if your unlock didn't work. Trying to delete a 
non-existent record because it hasn't been written yet. Think of it this 
way:
insertrecord creates a memory space (record buffer) to receive the 
record data.
assigning the value of all the fields just moves the data into the 
memory buffer.
unlockrecord writes the buffer to the underlying table. If this is 
unsuccessful, nothing gets written.
canceledit clears the  memory buffer with no table action. Edit ends.



On 25/06/2020 2:56 pm, Peter wrote:
> After tc.insertRecord() and populating the fields I have
> 
> if not tc.unLockRecord() then
>      tc.deleteRecord()
>      tc.endEdit()
>      tc.close()
> endIf
> 
> I was getting a Pdox err about keyviol and it showed Pdox choking on 
> tc.deleteRecord().


Copyright © 2004 thedbcommunity.com