Web Development

General discussion


ADODC1 syntax error in query expression

By ninedemo ·
Hi I am getting the an error stating syntax error in query expression 'start date LIKE '2%". The code concerned lookes like this:

Adodc1.RecordSource = "Select * From projandpro Where start date LIKE '" & Text5 & "%';"

Can anyone help me modify this code so that I dont get this error. Another point of interest is that when I insert Letters into the text feild it works fine, however when a number is put the above mentioned error appears. Thanks

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

by aureolin In reply to ADODC1 syntax error in qu ...

"start date" should be "startdate", "start_date" or perhaps "[start date]". SQL is not recognizing the column name and throwing the syntax error. Check with your DBA (assuming you have one!) on what the column name really is. If it does contain a space, use the brackets like I did in my example above.

Steve G.

Related Discussions

Related Forums