Re: Too few parameters. Expected 1.

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Bob Barrows [MVP] (reb01501_at_NOyahoo.SPAMcom)
Date: 10/20/04


Date: Wed, 20 Oct 2004 16:16:49 -0400

DVan wrote:
> Yes, that one.
>
> I added this per Ray, but still the same problem
>
> I added this to my webpage
>
> <SCRIPT LANGUAGE="JavaScript">
> Function sIn(s)
> sIn = "'" & Replace(s, "'", "''") & "'"
> End Function
> </SCRIPT>
>
>
> Then changed the strSQL to
>
> strSQL = "SELECT * FROM Printers WHERE PrinterName = sIn(iSerial)"
>
>
I repeat: Response.Write it and attempt to run the resulting statement from
the browser window in Access.

You'll see the problem (I hope). You cannot debug a sql statement without
knowing what it is. Knowing what the vbscript code that's supposed to
generate it looks like will not help. You need to look at the resulting
statement.

Hint: Does your Printers table contain a field called "sIn(iSerial)"?

Please consider using saved parameter queries as explained in the links in
my previous message.

Bob Barrows

--
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: Too few parameters. Expected 1.
    ... > DVan wrote: ... >> I added this per Ray, ... Knowing what the vbscript code that's supposed to ... > quicker response by posting to the newsgroup. ...
    (microsoft.public.inetserver.asp.general)
  • Re: OT...VETERANS DAY
    ... Even if spamadvertising by posting press releases is ... Ray has been doing this for years, ... not to include any signature line in press releases at all, as long as Ray, ... I would have been gone from this newsgroup long ago. ...
    (rec.travel.cruises)
  • Re: Pop Up Form Size
    ... MY point is this: I only asked a question on a newsgroup. ... If you do a scan of this newsgroup you'll see that Aaron, Ray and many ... huge disservice to the people who post legitimate ASP related questions, ...
    (microsoft.public.inetserver.asp.general)
  • Re: Planning and remembering
    ... Therefore, why should those with the biggest chip on their shoulder even be allowed to take over this newsgroup with nothing more than useless insults and name calling, and very little else. ... there's no question some people attack you rather than to ignore. ... Whether or not you intend it, you seem to be in some sort of contest with Ray and I would encourage you to get away from that appearance, although I'm not sure how. ...
    (rec.travel.cruises)
  • Re: The Finest Brass Section Ever Asembled-read Inside
    ... >Go to HLAS and Google "Elizabeth Weird Casual Reading" for more laughs. ... HLAS has to be the funniest newsgroup of them all. ... bizarre theories of the etiology of AIDS (more ... "Knowing what without knowing why is not knowing what" ...
    (rec.music.classical.recordings)