Re: Access Query w/VBScript
- From: "Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx>
- Date: Mon, 13 Jun 2005 15:06:51 -0400
Bob wrote:
> Still having problems. The lastest code:
>
> <SCRIPT LANGUAGE="VBScript">
>
> <HEAD>
>
> <TITLE>Use Access Query as Source</TITLE>
>
> </HEAD>
>
> <BODY>
>
> <%
>
> Set cn = createobject("adodb.connection")
>
> 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>
>
> The latest error message:
>
> Error Type:
>
> Microsoft VBScript runtime (0x800A01C2)
>
> Wrong number of arguments or invalid property assignment: 'objRS'
> /asptest/runaccessqry.asp, line 12
>
> Makes me want to stick to VBA...
>
> Thank you for your patience.
>
> Bob
Again, you've fallen victim to one of my typos (dammit):
if not objRS.EOF then Response.Write objrs(,,"","<p>")
should be
if not objRS.EOF then Response.Write objrs.getstring(,,"","<p>")
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
.
- Follow-Ups:
- Re: Access Query w/VBScript
- From: Bob
- Re: Access Query w/VBScript
- References:
- Re: Access Query w/VBScript
- From: Bob Barrows [MVP]
- Re: Access Query w/VBScript
- From: Bob Orta
- Re: Access Query w/VBScript
- From: Bob Barrows [MVP]
- Re: Access Query w/VBScript
- From: Bob
- Re: Access Query w/VBScript
- Prev by Date: Re: Access Query w/VBScript
- Next by Date: Help with unlock script
- Previous by thread: Re: Access Query w/VBScript
- Next by thread: Re: Access Query w/VBScript
- Index(es):
Relevant Pages
|