date translation function

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
edvnrijn
Posts: 1
Joined: Thu 19 May 2016 13:54

date translation function

Post by edvnrijn » Thu 19 May 2016 14:31

Hello,

We use unidac in our program to connect to either MySQL, MS-SQL or MS-Access.

A colleague of me build some queries that use {date ''yyyy-mm-dd''} to do a date check on several tables.

He left the company and i just found out that some of the queries give an error when used with an ms-access database : the ODBC driver says it's a 'data type mismatch in criteria expression'.

I found with dbmonitor that the query has the text "recalibration date > ('2016-01-01')".
But that should be "recalibrationdate > #2016-01-01#" as far as i know.
i also get the data i expect when i use that in the query so it seems to work.

I thought that the {date...} function was used to adapt the query for the different sql implementations .

Is there a bug in the '{date ......}' function or is there something wrong with our code ??

I hope that you can help me with this.

regards,
Ed van Rijn
Tradinco Instruments

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: date translation function

Post by AlexP » Mon 30 May 2016 12:47

Hello,

Thank you for the information. We have already fixed this problem.

Post Reply