Re: Access Query w/VBScript



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.


.



Relevant Pages

  • Re: Access Query w/VBScript
    ... > cn.qrySel objRS ... If you view the source of your page in the browser, ... Bob Barrows ... Please reply to the newsgroup. ...
    (microsoft.public.scripting.vbscript)
  • Re: Thanks for all the replies folks, a few more questions...
    ... bigget issue in this newsgroup has always been about that same freedom. ... sending bogus complaints to the BBB, ... Kindly point to one posting that was anti-DIY. ... Bob on every subject for years, all because Bob refuses to attack yours ...
    (alt.security.alarms)
  • Re: Error Creating ADODB.Connection Connection in IIS6
    ... I'm assuming MDAC is installed and working on the server*. ... You might try the .inetserver.iis newsgroup. ... Bob Barrows ... Brad Baker wrote: ...
    (microsoft.public.inetserver.asp.db)
  • Re: Brinks vs. Tech-man.com
    ... Don't be fooled into believing this guy by the length of his vulgar, hateful diatribes or the frequency with which he posts them. ... They've also followed me to the automation newsgroup, ... Jiminex has repeatedly threatened to destroy this newsgroup and others unless I stop posting. ... If you want to see the kind of person this guy is, check out what he's tried to do to Bob Campbell, one of the nicest people to ...
    (alt.security.alarms)
  • Re: Need Advice For Packaged Home Alarm Purchase
    ... Mike, 99% of these wars involve the same individual to whom you were ... >>> with anyone that posts here. ... >> Google search on this newsgroup using any of the filthiest street ... I doubt Bob Campbell ever has. ...
    (alt.security.alarms)