Using {ts in SQL Server

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
yeohray2
Posts: 21
Joined: Thu 08 May 2014 15:49

Using {ts in SQL Server

Post by yeohray2 » Fri 09 May 2014 01:54

In SQL Server, the following WHERE condition is valid:

Code: Select all

WHERE (DocumentDate > {ts '2011-08-01 00:00:00'}) 
However, if I run a query with this condition, Unidac treats it as a macro and returns a blank value, causing the SQL statement to fail. Is there a way to tell Unidac to not use macros, and leave the SQL statement intact?

Thanks in advance.

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

Re: Using {ts in SQL Server

Post by AlexP » Mon 12 May 2014 06:33

Hello,

To solve the problem, you should set the EnableUniSQL global variable to False.

yeohray2
Posts: 21
Joined: Thu 08 May 2014 15:49

Re: Using {ts in SQL Server

Post by yeohray2 » Mon 12 May 2014 16:04

Thanks, that worked.

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

Re: Using {ts in SQL Server

Post by AlexP » Tue 13 May 2014 06:58

Glad to see that the issue was resolved. If you have any further questions, feel free to contact us.

Post Reply