Hi all
We have been having all sorts of reliability problems with our XBase++ application. More specifically transactions failing to write reliably into DBF tables.
Some time ago we began to suspect that the delete flag function in the Alaska RDD is 'flakey' so added code that attempted to check if the delete flag was set correctly before moving on.
Recently, I noticed some code we received did not use the DELETE record flag and seemed to clear field contents instead.
Is this a known issue in the Alaska DBF drivers?
Michael
DBF record Delete flag
Re: DBF record Delete flag
We have many applications supporting databases containing over a million records using .Dbf and .Ntx without issue and use DELETED().
Re: DBF record Delete flag
Michael -
Your posting triggered my memory about a problem I had when helping a customer (Bobby Drakos) with a big problem he was having after a dbGoTo(). We found that the value of the fields did not always load unless we skip off the record and back onto it again. This was causing multiple records to get added because the code read the wrong field value for that record and believed that it was at Eof() or the record was empty. I wonder if this is a similar issue with Deleted(). We made sure to always call ReloadRecord() after a dbGoTo() and the problem went away.
Your posting triggered my memory about a problem I had when helping a customer (Bobby Drakos) with a big problem he was having after a dbGoTo(). We found that the value of the fields did not always load unless we skip off the record and back onto it again. This was causing multiple records to get added because the code read the wrong field value for that record and believed that it was at Eof() or the record was empty. I wonder if this is a similar issue with Deleted(). We made sure to always call ReloadRecord() after a dbGoTo() and the problem went away.
Code: Select all
FUNCTION ReloadRecord()
LOCAL nSaveRec := RecNo(), nSaveOrder := OrdSetFocus(0)
dbSkip()
dbSkip(-1)
IF nSaveRec # RecNo()
dbGoTo(nSaveRec)
ENDIF
OrdSetFocus(nSaveOrder)
RETURN nil
The eXpress train is coming - and it has more cars.
Re: DBF record Delete flag
Richard
The problem manifests itself on sequential DELETE() on many records.
In our case transactions like cancel a 'split' receipt. This transaction has a header plus one to 100's of sub-item records.
It does not happen all the time, just often enough to be highly irritating!
... so I guess it may depend on whether the application does single or multiple deletes .. and possibly how they are done.
Roger
Very helpful comment, thanks, I will try calling ReloadRecord() after a dbGoTo()... we do all sorts of things to verify transactions but that's one we haven't tried yet.
Michael
The problem manifests itself on sequential DELETE() on many records.
In our case transactions like cancel a 'split' receipt. This transaction has a header plus one to 100's of sub-item records.
It does not happen all the time, just often enough to be highly irritating!
... so I guess it may depend on whether the application does single or multiple deletes .. and possibly how they are done.
Roger
Very helpful comment, thanks, I will try calling ReloadRecord() after a dbGoTo()... we do all sorts of things to verify transactions but that's one we haven't tried yet.
Michael