Re: Access Query w/VBScript



I tried each method in the replys, but none worked - various errors.

Here is the code I used (using the last replys suggestion):

<SCRIPT LANGUAGE="VBScript">
<HEAD>
<TITLE>Use Access Query as Source</TITLE>
</HEAD>
<BODY>
<%
Set cn = createobject("adodb.connection")
'cn.open "DRIVER={Microsoft Access Driver
(*.mdb)};DBQ=C:\Bob\Personnel.mdb"

cn.open "Provider=microsoft.jet.oledb.4.0;" & _
"Data Source=C:=\Bob\Personnel.mdb"
Set objRS = CreateObject("ADODB.Recordset")
cn.qrySel objRS
if not objRS.EOF then Response.Write objrs(,,"","<p>")
objRS.Close
Set objRS=nothing
%>
</BODY>
</HTML>

Note that I commented out one of the connection methods.

The error message:
Microsoft JET Database Engine (0x80004005)
Could not find file 'C:\WINNT\system32\Personnel.mdb'.
/asptest/RunAccessQry2.asp, line 10

It seems that the code is not looking in the correct directory.

Thanks again,
Bob



*** Sent via Developersdex http://www.developersdex.com ***
.


Loading