Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Last Updated 1

Status
Not open for further replies.

CFTyrant

Programmer
Mar 25, 2002
13
US
Is there a way, using CF to query when a Database has been last updated?

I have a page that has several different user updatable area - messageboards, guestbooks, etc.

Does CF have a function that would allow me to just query the DB by the datasource name and obtain the last time that this file was updated?

I realize that I could make a table in a db and write the last updated date & time each time someone made a change. But that would be a lot of code to write. I'm hoping that there is a way to do this similar to the functions available in SSI.

As an FYI, my databases are stored in a directory outside the web path -
Root:
Website Stored here http:// points directly to this

DBS -> not accessible directly through any http:// command

So, I'm pretty sure that SSI won't work to query the last modified on my DBs.

Any suggestions are welcome!

Thanks!
 
If it is an access database, you could use cfdirectory to grab the information about the file, including the Last Modified date. Much like ssi:

e.g
<cfdirectory name=&quot;GetLastMod&quot; directory=&quot;c:\DBS\&quot; filter=&quot;myaccessfile.mdb&quot; action=&quot;list&quot;>

<cfoutput>DB Last updated on #GetLastMod.dateLastModified#</cfoutput>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top