%@ Language=VBScript %> <% '*********************************************************************** ' System : ASPTest ' Author : Christopher Williams of CJWSoft www.CJWSoft.com ' Purpose : This code is used for testing the physical path ' information needed for a DSN-LESS connection. ' ' COPYRIGHT NOTICE ' ' ' (c) Copyright 2000 - 2003 by CJWSoft. All rights reserved '*********************************************************************** %> <% '*** Below is the only setting you need to edit in this file Database_Physical_Path = "C:\Inetpub\wwwroot\asptewst\_database\asptest.mdb" '*** NOTE: You can not use something like "http:\\" to specify the data path.. it must be a drive location..if you don't know it ask the system admin. Function FileFound(FileName) Dim FileObj FileFound = True Set fs = CreateObject("Scripting.FileSystemObject") On Error Resume Next Set FileObj = fs.OpenTextFile(FileName, 1, False, 0) If Err.Number <> 0 Then Err.Clear FileFound = False Exit Function End If FileObj.Close Set fs = Nothing End Function %> <% If FileFound(Database_Physical_Path) Then %>
That path is correct.
The file specified was found.
"<% =Database_Physical_Path %>"
<% Else %>That path does not exist on the server and is not correct.
The file specified could not be found.
It is also remotely possible that read permissions are not set for the anonymous webserver account where that file resides. However, That is unlikely because read permissions are there by default.
"<% =Database_Physical_Path %>"
<% End If %>