Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Record missing after End Transaction
Hi All
I have a problem with updating one table using VFP 6 SP3.
Multilocks are ON and the buffer mode for the problem table is 3
What happens is, the third table Assnlog doesn't get a record added to it. Well that's how it looks. If I check the record count of 'assnlog' just before the END TRANSACTION in the code below, the count has gone up by 1 and you can browse the table and see the record. Immediately after the END TRANSACTION the record count goes back down by 1 and the record has disappeared.
Also if I then try to open Assnlog in a form I get the error 2005 and the message
"Error loading file - record number 14. frmAssnMst or one of its members .Loading form or the data environment : Record is out of range ".
(which is odd because that seems like the wrong message for code 2005.)
After running a program to rebuild the cdx for Assnlog the table can be opened again but still with the new record missing.
Any ideas would be greatfully appreciated.
BEGIN TRANSACTION
llSuccess = TABLEUPDATE(.T.,.F.,'assesmnt')
IF llSuccess
llSuccess = TABLEUPDATE(.T.,.F.,'land')
IF llSuccess
llSuccess = TABLEUPDATE(.T.,.F.,'assnlog')
IF llSuccess AND THISFORM.adding AND THISFORM.casstype = "A"
llSuccess = TABLEUPDATE(.T.,.F.,'lastupdt')
IF llSuccess AND THISFORM.LevyAffected = .T.
llSuccess = TABLEUPDATE(.T.,.F.,'levies')
ENDIF
ENDIF
ENDIF
ENDIF
IF llSuccess
END TRANSACTION
THISFORM.SavedOk = .T.
THISFORM.LastRecNo = RECNO()
ELSE
ROLLBACK
=TABLEREVERT(.T.,'assesmnt')
=TABLEREVERT(.T.,'land')
=TABLEREVERT(.T.,'assnlog')
=TABLEREVERT(.T.,'lastupdt')
=TABLEREVERT(.T.,'levies')
AERROR(laError)
THISFORM.Cmdsave.ERROR(laError[1], 'Save', LINENO())
THISFORM.SavedOk = .F.
ENDIF
TIA
Chris
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement