Timestamp

R

Rick

hi all,

i have a database setup thru fp. i have added the hidden field Timestamp to
the submission form and am able to retreive it thru the dbrw when i use a
query to get the detail info for the record. what i also need to do is to
have the timestamp field updated when i use the db editor to change an
existing record so that the query results will show the most current
timestamp when the record was actually updated, not just when it was
submitted and i cannot figure out how to do this.

any help greatly appreciated.
 
M

Mark Fitzpatrick

Change the update statement itself. Most databases have a datetime function
so that you could say something like

Update myTable
Set myTimestamp = GetDate()
Where myId = 1

You don't need to do any sort of hidden fields or anything as fancy as that,
just use what the database already provides. For SQL Server, it's GetDate()
and will return the current date and time. Other databases like Access
should offer something similar.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - Expression
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top