Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Save the date of the last data save...
Message
De
16/07/1999 17:45:03
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Save the date of the last data save...
Divers
Thread ID:
00242612
Message ID:
00242612
Vues:
65
I want to save the date (an maybe time) of the last time a User modified data in my app. So in my save procedure I determine if the any field in the record has been changed. Then I save the current date to the to the ldate field in my tables. There also is an fdate field where the default value is date().

My question is : is this a kosher way of doing things? Also, I only want to save the date if a any one field has been changed, I thought this seemed obvious but I havn't been getting the results I wanted. The current save code on my DE forms looks something like:
local llSaved, ;
	laTables[1], ;
	lnCursor, ;
	lcAlias
begin transaction
llSaved = .T.
for lnCursor = 1 to aused(laTables)
	lcAlias = laTables[lnCursor, 1]
	if cursorgetprop('Buffering', lcAlias) > DB_BUFOFF
		llSaved = tableupdate(2, .F., lcAlias)
		if not llSaved
			exit
		endif not llSaved
	endif cursorgetprop('Buffering', lcAlias) > DB_BUFOFF
next lnI

if llSaved
	end transaction
	This.oForm.GoRecord(recno())
else
	rollback && and some more error stuff

endif llSaved
return llSaved
Any input would be real usefull.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform