Hello Guys,
I just found this thread through google, and wanted to add to what you guys already said that Instead of entering WWW URL's, you may also use server path to the file in question. To find out about your server variables, here is what you do:
1- Create a blank file and save it as "serverinfo.asp".
2- Enter the following code in that file to get all your server variables:
<div align="left">
<table border="0" cellpadding="0" cellspacing="0" width="750">
<tr>
<td valign="top" align="left" width="150"><font face="Arial" size="2" color="#FF0000"><b>Variable Name</b></font></td>
<td valign="top" align="left" width="600"><font face="Arial" size="2"><b>Value</font></b></td>
</tr>
<%
for each name in request.servervariables
%>
<tr>
<td valign="top" align="left" width="150">
<font face="Arial" size="1" color="#FF0000">
<%= name %></font></td>
<td valign="top" align="left" width="600">
<font face="Arial" size="1"><%= request.servervariables(name) %></font></td>
</tr>
<%
Next
%>
</table>
</div>
3- Look up the server variable for Path to your directory, where the ".mdb" file is at. It will be something like this:
C:/Inetpub/wwwroot/test.mdb
4- Use the connection string to connect to the database:
<%
dim cnn,rst
set cnn = Server.CreateObject("ADODB.Connection")
set rst = Server.CreateObject("ADODB.RecordSet")
cnn.Open "driver={Microsoft Access Driver (*.mdb)};;DBQ=C:/Inetpub/wwwroot/test.mdb;"
sqltext = "SELECT * FROM test"
rst.Open sqltext,cnn,3,3
%>
That's it! Again, thank you all for the initial thread. Very useful information.
Pete