And now i run into a the following range check error.
The original code is like this sample
Code: Select all
with query1 do
begin
sql.add('SELECT foo, bar from ( ');
sql.add(' SELECT foo, bar FROM TABLE1 WHERE xyz = :p1 ');
sql.add(' UNION ALL ');
sql.add(' SELECT foo, bar FROM TABLE2 WHERE XYZ = :p1 ) ');
params[0].asString := edit1.text;
params[1].asString := edit1.text;
end;
My question now is, can i change the behavior of UniDac or do i have to check all these paramcounts and eliminate the duplicates?
I know option two is the better/correct way, but there is plenty of this kind of code in the project.

