I often have to take over websites from other developers and need to fix things that don’t work, so one of the first things I need to find is what the paths are. This would be useful for database paths and for aspjpeg, where you need the actual path, so I made this little script that I normally save as a file pathfinder.asp.

<%@LANGUAGE=”VBSCRIPT”%>
<html>
<head>
<title>Outsource House Path Finder</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
</head>
<body bgcolor=”#FFFFFF” text=”#000000″ link=”#FF0000″ vlink=”#FF0000″ alink=”#FF0000″>
<p align=”center”><font face=”Verdana, Arial, Helvetica, sans-serif” size=”4″><b>Outsource House Path Finder</b></font></p>
<p align=”center”><font face=”Verdana, Arial, Helvetica, sans-serif” size=”2″>Simply change <b>YourDatabase.mdb</b> to your actual database file name</font></p>
<p>&nbsp;</p>
<p><B><font face=”Arial, Helvetica, sans-serif” size=”2″>DSNLess Connection String is</font></B> <br>
<font face=”Arial, Helvetica, sans-serif”> <font size=”2″>
<%
Response.Write(“DRIVER={Microsoft Access Driver (*.mdb)};DBQ=” & Server.MapPath(“YourDatabase.mdb”))
%>
</font> </font> </p>
<P> <B><font face=”Arial, Helvetica, sans-serif” size=”2″>OLEDB Connection String is</font></B> <br>
<font face=”Arial, Helvetica, sans-serif”> <font size=”2″>
<%
Response.Write(“Provider=Microsoft.Jet.OLEDB.4.0;Data Source=” & Server.MapPath(“YourDatabase.mdb”))
%>

</font></font>

</body>

</html>

Hope it helps you too.

About Paul Ogier

Paul Ogier has written 202 posts.

Paul Ogier is an IT Guru, Website Developer, and generally a nice guy. He loves code and he loves design.