[thelist] ASP using Access as the DB: How to find the path to the DB if you don't have the actual one?

Elfur Logadottir elfur at elfur.is
Tue Feb 27 13:06:07 CST 2001

is there any other way than what I have below?

I ask because this gives me trouble if the files that have
to connect to the db are in different level of subfolders
(which explains why the bottom two lines are sometimes
commented out).

this example is almost completely taken out of Beginning ASP
3.0 by Wrox, with only slight alterations by me.


:::::::::::::::the code::::::::::::::
 Dim strPathInfo, strPhysicalPath, objFSO, objFile,
 strPathInfo = Request.ServerVariables("SCRIPT_NAME")
 strPhysicalPath = Server.MapPath(strPathInfo)
 Set objFSO = CreateObject("Scripting.FileSystemObject")
 set objFile = objFSO.GetFile(strPhysicalPath)
 set objFolder = objFile.ParentFolder
 'set objFolder = objFolder.ParentFolder
 'set objFolder = objFolder.ParentFolder

More information about the thelist mailing list