Re: Access Query w/VBScript
- From: Bob Orta <bob_orta@xxxxxxxxxxxxx>
- Date: Sun, 12 Jun 2005 11:39:16 -0700
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 ***
.
- Follow-Ups:
- Re: Access Query w/VBScript
- From: Bob Barrows [MVP]
- Re: Access Query w/VBScript
- From: Bob Barrows [MVP]
- Re: Access Query w/VBScript
- References:
- Re: Access Query w/VBScript
- From: Bob Barrows [MVP]
- Re: Access Query w/VBScript
- Prev by Date: Add automatic number (reading XLS file) for each entry
- Next by Date: Re: Accessing and changing File properties
- Previous by thread: Re: Access Query w/VBScript
- Next by thread: Re: Access Query w/VBScript
- Index(es):
Loading