Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datatype mismatch in criteria expression

Status
Not open for further replies.

billybobk

Programmer
Oct 14, 2002
130
US
I'm NOT a Front Page guy, but I'm trying to help out my boss here. In his code he's got the following stuff (Querying an Access database with ASP, the variable is declared as date/time in Access)
-------------------------
Select * from Results where (Timestamp > '::Timestamp::') order by ID desc
------------------------------
Now, his field name is Timestamp and the variable name is also named Timestamp. (Go figure.) But this raises the 'datatype mismatch in criteria expression' error. Any thoughts on this issue?? Thanks in advance.
 
We have now changed '::Timestamp::' to '::Begin::' (the textbox name) with the same error message.
 
So, how does one get to the page that has the Select * from Results where (Timestamp > '::Timestamp::') order by ID desc
in the code?

seems that either there is a field name that doesn't match the column name in the database, or that the data being passed to this page is not in an acceptable format for the column criteria in the database....

just a guess withought being able to see any of the pages or understanding the flow.

Tiffany

Microsoft MVP - FrontPage
 
Let me re-phrase the question: What is the datatype name in ASP for dates & times. The Front Page f1 help is very vague here.
 
Ok, sorry - but I think I just "got it" and have had this same error in the past. The workaround I used was to change the date column to text, rather then date/time. Now, in looking for a support article to help you resolve the issue, I found answers that help me too... Check out these 2 KB articles:



HTH
Tiffany

Microsoft MVP - FrontPage
 
Thanks for all your help Noconi. He solved the problem. It was a Microsoft bug. The solution had to do with adding # before and after the textbox value like this:
#'::Timestamp::'#
I don't have the details since he has now left for a meeting. Anyway it is working now!
Thanks again!!
 
Are you the Tiffany Edmonds on that book? Any relation to the Edmonds/Kremers of Ohio & Pennsylvania?
 
Yes, I am the Tiffany Edmonds on the book(s) <G>, but I am Edmonds by marraige. I do some genealogy and I don't think my husband has relatives in Ohio or Penns., or any Kremers on his tree.

Tiffany
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top