Page 1 of 1

Problems with migrate from MyDac to UniDac

Posted: Sat 29 May 2010 23:15
by maciejmt
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 ?

Posted: Tue 01 Jun 2010 14:01
by Dimon
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.