Execute an Unicode query in Delphi 7

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
divanov
Posts: 1
Joined: Fri 22 Feb 2013 11:48

Execute an Unicode query in Delphi 7

Post by divanov » Fri 22 Feb 2013 11:55

Hello,

Is there a way to execute an SQL query containing unicode characters using TUniQuery? I'm on Delphi 7, MSCE 4.0, and Unidac 4.6.11.

I would like to execute a query like below:

INSERT INTO item (caption) VALUES (N'هیروشی');

I understand that the SQL property is declared in Delphi 7 as TStrings, but probably there is an alternate way (like in ADO). Thank you.

AndreyZ

Re: Execute an Unicode query in Delphi 7

Post by AndreyZ » Fri 22 Feb 2013 12:51

To execute such query in Delphi 7, you should set the Windows codepage to the one where such symbols are treated as non-unicode symbols. If you do not want or cannot do that, you should use Delphi with full unicode support instead of Delphi 7. Delphi fully supports unicode starting with Delphi 2009.

Post Reply