Problems with migrate from MyDac to UniDac

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
maciejmt
Posts: 27
Joined: Sun 25 Apr 2010 14:14

Problems with migrate from MyDac to UniDac

Post by maciejmt » Sat 29 May 2010 23:15

myquery1.SQL.Text := 'select * from table WHERE col="XXX" ';
myquery1.Open;
showmessage(myquery1.Fields[0].AsString);

//ok

//quotation marks
uniquery1.SQL.Text := 'select * from table WHERE col="XXX" ';
uniquery1.Open;
showmessage(uniquery1.Fields[0].AsString);

// not ok

//two apostrophes
uniquery1.SQL.Text := 'select * from table WHERE col=''XX''';
uniquery1.Open;
showmessage(uniquery1.Fields[0].AsString);

//ok


Why quotation marks "" dont working correctly ?

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Tue 01 Jun 2010 14:01

As the UniDAC library is designed to help develop cross-database applications, therefore it formats SQL to universal form. To disable this functionality you should set the EnableUniSQL global variable from the Uni unit to False.

Post Reply