If you're talking about an Access database, and all you want is the last
date modified for the mdb file, use the CFDIRECTORY tag.  It can read a
directory and return info on files in that directory.  If you only have one
mdb file in the directory you can use the filter= attribute so that you
don't have to loop through the query to find the right record.

Here's an example:
<cfdirectory action="LIST" directory="C:\MyDirectory" name="qryDir"
filter="*.mdb">

<cfoutput>
#qryDir.DateLastModified#
</cfoutput>

If you can't be sure of returning only one record, you can change it to:

<cfoutput>
<cfif qryDir.Name EQ "Mydb.mdb">
        #qryDir.DateLastModified#
</cfif>
</cfoutput>

Of course, you could parameterize the file name - heck, you could even make
it into a pretty simple custom tag!

Bob

-----Original Message-----
From: Bernd VanSkiver [mailto:[EMAIL PROTECTED]]
Sent: Saturday, March 17, 2001 11:49 PM
To: CF-Talk
Subject: last updated


Is there a way for cf to see when a certain database was last modified?
Wanting to show last updated date to site content and product information on
front page and think being able to see when the database was last modified
would be the easiest way to do it.

Bernd VanSkiver
[EMAIL PROTECTED]
ColdFusion Developer
ICQ #: 916324
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to