This topic is locked

Date search

3/22/2004 6:22:16 AM
ASPRunnerPro General questions
A
armstrong7979 author

When i try and search using the date fields I get the following error. I have defined felds as date fields when generating the .asp pages.
Technical information

Error number -2147217913

Error description [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.

URL /claims/New_DAS_Claim_list.asp

SQL query SELECT [Code], [Surname], [First_Name], [Date_Received], [Date_of_Accident], [Our_Reference], [Referrer_Reference], [Driver/Passanger], [Reject_Date], [Reject_Code], [Postion], [Admin_Fee], [Type_of_Claim] From [New_Claim] WHERE [Type_of_Claim] IN ('DAS') AND [Date_Received]='14/03/02' "

501047 3/22/2004

The Admin can correct me but the way the page is set up you can only look for a string match. Notice in the SQL that there are aposterpheries (sp?) around the date '3/22/2004'. It is doing a string match. It would need to read #3/22/2004# inorder to use the greater than, etc. Without rewriting a lot of the code I didn't see an easy solution to this problem. Seems like the code is set up to always do string comparisons.
Have a great day <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=1449&image=1&table=forumreplies' class='bbc_emoticon' alt=':P' />

Sergey Kornilov admin 3/23/2004

This problem was fixed in ASPRunner Professional. Please find more info about ASPRunnerPro here:

http://www.xlinesoft.com/asprunnerpro

501048 4/14/2005

Hello,
I, ve found the same problem. De Admin, Mr. Sergey Kornilov, says the bug is fixed in the last version, but I am trying the last version and I see the problem persists. Really it's fixed?
Thanks

Sergey Kornilov admin 4/14/2005

In ASPRunnerPro 3.1-3.2 date values are wrapped by #...# while working with MS Access databases.
Please note that when you connect to MS Access database using ODBC DSN ASPRunner unable to determine database type and date search won't work.

501049 5/1/2005

One could also change data format from date to text. That usually solves problems with both data editing and searching.