Question : SQL Syntax Error

This has got me stumped.  Here is the SQL Statement that was built in Access query builder and works fine in Access but will not work in an ASP page:

SELECT ECP.ecp_id, ECP.Report, ECP.Rev1, ECP.Rev2, Techs.Role, ECP.Branch
FROM Techs INNER JOIN ECP ON Techs.User_Id = ECP.User_Id
WHERE (((ECP.Branch)="White"));

I get this error:  [Microsoft][ODBC Microsoft Access Driver] Too few parameters Expected 1.
 I checked the column names and they are correct.  Data type is text.  Access 2003. Help....

Answer : SQL Syntax Error

How is the query passed in ASP?

What may be your issue is that since you are building a string and have quoted string in the query, you will need to escape these. Typically this is done using two double quotes.

i.e., "White" == ""White""

Random Solutions  
 
programming4us programming4us