correct me if i am wrong (i am not a .Net developer in any way), but
doesn't your .Net code expect you to provide the path to the db as well?
or is Session(DBpath) some variable automatically created by .Net?
Azadi
On 24/06/2010 05:43, John Pullam wrote:
This info is not made readily
I have a datasource that points to an Access database (no editorializing
please, I didn't create it). I need to do a GetFileInfo on it
to obtain the last modified date. This was pretty easy in .Net (I'm
converting it from .Net to CF) but I can't figure out how to do it in
CF. GetFileInfo
I dislike .Net but it certainly was simple there. It took 3 lines:
db = Session(DBpath) myDB.mdb
Dim myFile as FileInfo = New FileInfo(db)
Dim ModDate as Date = myFile.LastWriteTime
That makes it look like the path was really just in a Session var in .NET; is
that the
You are correct. I made an assumption that was incorrect and now realize that
it was the same issue in .Net.
For what its worth, I have decided to base the file location on the relative
location from my website root. That is not likely to change while the ISP could
always reqyuire me to move
You are correct. I made an assumption that was incorrect and now realize that
it was the same issue in .Net.
For what it's worth, I have decided to base the file location on the relative
location from my website root. That is not likely to change, but the ISP could
always require me to move
I have a datasource that points to an Access database (no editorializing
please, I didn't create it). I need to do a GetFileInfo on it to obtain the
last modified date. This was pretty easy in .Net (I'm converting it from .Net
to CF) but I can't figure out how to do it in CF. GetFileInfo
If you know the absolute path to the DB
You can just set a global var that holds that path.
Of course that isn't the most graceful solution, but I'm not sure if
there is a way to programmatically determine the absolute path of an
Access DB used in a CF datasource.
If the DB won't be moving
This info is not made readily available unless you unlock it.
You need access to the database...
Open the database
Go to tools--Options
Check the box under *show* that says *system Objects*. You will notice that
several new tables appear in table view with the prefix MSys -
MSysAccessObjects,
In your query you might want to
SELECT Max(UpdateDate)
Sorry =)
Jim Eisenhauer
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
I do know the absolute path but the whole idea was to make it work correctly
even if something might change. I was looking for a more elegant solution!
~|
Order the Adobe Coldfusion Anthology now!
This info is not made readily available unless you unlock it.
You need access to the database...
Open the database
Go to tools--Options
Check the box under *show* that says *system Objects*. You will notice that
several new tables appear in table view with the prefix MSys -
MSysAccessObjects,
datasources.
.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
-Original Message-
From: Bryan Stevenson [mailto:br...@electricedgesystems.com]
Sent: Wednesday, June 23, 2010 5:35 PM
To: cf-talk
Subject: Re: How can you GetFileInfo for a datasource?
If you know
and
voila... hack city.
.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
-Original Message-
From: Bobby Hartsfield [mailto:bo...@acoderslife.com]
Sent: Wednesday, June 23, 2010 5:51 PM
To: cf-talk
Subject: RE: How can you GetFileInfo for a datasource?
I believe you
On 6/23/2010 2:40 PM, John Pullam wrote:
I do know the absolute path but the whole idea was to make it work correctly
even if something might change. I was looking for a more elegant solution!
CF has file|path several functions that might help you here.
expandPath() might do something.
On Wed, 2010-06-23 at 17:40 -0400, John Pullam wrote:
I do know the absolute path but the whole idea was to make it work correctly
even if something might change. I was looking for a more elegant solution!
I figured as muchwrap it in a try/catch and handle that eventuality
as needed.
15 matches
Mail list logo