Re: Too few parameters. Expected 1.
From: Bob Barrows [MVP] (reb01501_at_NOyahoo.SPAMcom)
Date: 10/20/04
- Next message: Bob Barrows [MVP]: "Re: Error message with sql statement"
- Previous message: Jack: "Error message with sql statement"
- In reply to: DVan: "Re: Too few parameters. Expected 1."
- Next in thread: DVan: "Re: Too few parameters. Expected 1."
- Reply: DVan: "Re: Too few parameters. Expected 1."
- Messages sorted by: [ date ] [ thread ]
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.
- Next message: Bob Barrows [MVP]: "Re: Error message with sql statement"
- Previous message: Jack: "Error message with sql statement"
- In reply to: DVan: "Re: Too few parameters. Expected 1."
- Next in thread: DVan: "Re: Too few parameters. Expected 1."
- Reply: DVan: "Re: Too few parameters. Expected 1."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|