Page 1 of 1

Execute an Unicode query in Delphi 7

Posted: Fri 22 Feb 2013 11:55
by divanov
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.

Re: Execute an Unicode query in Delphi 7

Posted: Fri 22 Feb 2013 12:51
by AndreyZ
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.