inrtoduce a new behaviour, different than the "TDataSet one", for ParamByName. for example it could be a new property called TMSQuery.GenerateParametrizedSQL.
Let's consdier a MSQuery1 for which the SQL is
Code: Select all
select * from table where ID = :ID
Code: Select all
MSQuery1.ParamByName('ID').AsInteger := 45;
MSQuery1.Open;
CASE 1: MSQuery1.GenerateParametrizedSQL is True (default) the query sent to the server will be a parametrized one (current behaviour):
Code: Select all
exec sp_executesql N'select * from table where ID = @P1',N'@P1 int',45
Code: Select all
select * from table where ID = 45 -- simple Search&Replace performed by ParamByName!!!
Please comment on this suggestion.
======================
As an extra reference for why this is useful please see also this question on StackOverflow I posted: http://stackoverflow.com/questions/4408 ... parameters