rdmusn2005 Posted July 22, 2014 Share Posted July 22, 2014 Help. The block of code that is giving me fits. DTS = Date() - 7 DTS = FormatDateTime(DTS, 2) Set GuildEvents = Server.CreateObject("ADODB.Recordset") SQLQuery = "SELECT * FROM EVENTS WHERE EventDate > '"& DTS &"' ORDER BY EventDate" Set GuildEvents = Conn.Execute(SQLQuery) This is not working. For some reason, I am getting the following error: Microsoft Office Access Database Engine error '80040e07' Data type mismatch in criteria expression. /va/calendar.asp, line 10 Now, my understanding is because the database stored the data in the EventDate as Date/Time. But I used Short Date for the type (using MS Access). Can't figure out why the mismatch. Help please. Link to comment Share on other sites More sharing options...
justsomeguy Posted July 22, 2014 Share Posted July 22, 2014 I would start by printing out the query to see what you're sending to the database. 1 Link to comment Share on other sites More sharing options...
rdmusn2005 Posted July 24, 2014 Author Share Posted July 24, 2014 I figured that issue out. I was querying short date but I had faile to set short date n the table. So I was getting date and time (having stored Now() as the date sent in the form that made the record. Once I fixed that, everything was working. Thanks for the post tho. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now