Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: SV: RE: SQL String..?


Message #1 by "SD-Studios" <info@s...> on Wed, 22 May 2002 23:37:42 +0200
Thanks a lot! =)
--
MVH, Martin Johansson
CEO & Project Supervisor
SD-Studios
+46 (0)70-3003320
http://www.sd-studios.com


-----Ursprungligt meddelande-----
Från: Peter Foti (PeterF) [mailto:PeterF@S...]
Skickat: den 22 maj 2002 23:06
Till: ASP Databases
Ämne: [asp_databases] RE: SQL String..?


SQL = "SELECT * FROM Poll_Answers WHERE question = questionid AND answer 
answerid"

Should be:

SQL = "SELECT * FROM Poll_Answers WHERE question = " & questionid & " AND
answer = " & answerid


Regards,
Pete

> -----Original Message-----
> From: SD-Studios [mailto:info@s...]
> Sent: Wednesday, May 22, 2002 4:27 PM
> To: ASP Databases
> Subject: [asp_databases] SQL String..?
>
>
> Hi!
>
> I've been trying different ways of getting values, but
> nothing seems to
> work. This is one of the ways I tried.
>
> questionid = CDbl(Request.QueryString("question"))
> answerid = CDbl(Request.QueryString("answer"))
>
> SQL = "SELECT * FROM Poll_Answers WHERE question = questionid
> AND answer 
> answerid"
>
> Here's the error I get:
> Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
> [Microsoft][ODBC Microsoft Access Driver] Too few parameters.
> Expected 2.
>
> What's wrong? =(
> --
> MVH, Martin Johansson
> CEO & Project Supervisor
> SD-Studios
> +46 (0)70-3003320
> http://www.sd-studios.com
>
>
>



  Return to Index