Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Save the date of the last data save...
Message
From
16/07/1999 17:45:03
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Save the date of the last data save...
Miscellaneous
Thread ID:
00242612
Message ID:
00242612
Views:
59
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.
Next
Reply
Map
View

Click here to load this message in the networking platform