• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 164
  • Last Modified:

ASP & Where clause

I am getting this error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'dtTimeStamp = 6/29/99 8:13:52 AM'.

/survey/SubmitUser.asp, line 11

All I am trying to do is a simple where clause
sSql1 = "SELECT UserID FROM SurveyAnswers WHERE dtTimeStamp = " & TimeStamp
Set rsUserID = OBJdbConnection.Execute(sSql1)
Any ideas would be great.

1 Solution
try this :

sSql1 = "SELECT UserID FROM SurveyAnswers WHERE dtTimeStamp = #" & TimeStamp &"#"

Doesn't it require the date value to be inside some inverted commas?
yolishAuthor Commented:
Thanks it worked
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now