Myquery.sql.text with params

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
cybsistemas
Posts: 118
Joined: Mon 12 Sep 2005 17:31
Location: Argentina

Myquery.sql.text with params

Post by cybsistemas » Wed 12 Nov 2014 02:24

Is there a property that returns me the text of a query with the values of the parameters? How in the example below
Thank you
Example
MyQuery1.SQL.Text := 'insert into bloqueos values(:one,:two,:tree)';
MyQuery1.ParamByName('one').AsString := 'John';
MyQuery1.ParamByName('two').AsString := 'Peter';
MyQuery1.ParamByName('tree').AsInteger := 3;
Cad := MyQuery1.SQL.Text;
For i := 0 to MyQuery1.ParamCount-1 do
Cad := StringReplace(Cad,':'+MyQuery1.Params.Items.Name,MyQuery1.Params.Items.Value,[rfReplaceAll]);
ShowMessage(cad);

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Myquery.sql.text with params

Post by ViktorV » Wed 12 Nov 2014 09:30

Unfortunately, at the moment MyDAC doesn't support this functionality.
If you want us to implement this functionality, please post it at our user voice forum: http://devart.uservoice.com/forums/1046 ... 8913-mysql
If the suggestion gets a lot of votes, we will consider the possibility to implement it.

Post Reply