I have an Access Db with C# and I am doing a concatenation in sql query aftere where clause but I am getting the following error
“Syntax error (missing operator) in query expression”
My code is below
cmd.CommandText = "Select * from TEMP1 WHERE EMAIL=" + GlobalData.Email;
Please tell me what is causing the error and what the correct syntax is for concatenation.
You’d better use SqlParameter (more secure):
To answer to the original question:
Using direct concatenation, without string delimiter, your query become:
instead of