I am having the following problem to set some parameters in a MSQuery. When own parameters that are repeated in the query and dynamically create (CreateParam or ParseSQL), the second value is NULL when seen in Profiler.
Example:
Code: Select all
MSQueryPl1.ParamCheck := False;
MSQueryPl1.SQL.Text := 'select * from table where field = :field and '''' <> :field';
MSQueryPl1.Params.ParseSQL(MSQueryPl1.SQL.Text, True);
MSQueryPl1.ParamByName('field', 'value', ftString);This way it works:
Code: Select all
MSQueryPl1.ParamCheck := True;
MSQueryPl1.SQL.Text := 'select * from table where field = :field and '''' <> :field';
MSQueryPl1.ParamByName('field', 'value', ftString);