How to use Substitution variables in 3Tiers

I have a SQL with:
where FieldName in (:FILEDSVALUES)
in my Delphi program i use
Params.ParamByName('FILEDSVALUES').AsString:= '''Value1'',''Value2''';

but the SQL don't work.
Trynig the SQL directly from SQLEditor it work correctly.
What's appen?
Fabio.
 
Look this:
with ClientDataSet1 do
begin
Close;
if Params.Count = 0 then FetchParams;
Params.ParamByName('IDGESTION').AsFloat:= 3;
Params.ParamByName('IDSERVICE').AsFloat:= 8;
Params.ParamByName('OBJSCODES').AsString:= '''TFIMMPATH'',''TFIMMMOTIVECONTRACTSTATE''';
// OracleDataSet1.SetVariable('IDGESTION',3);
// OracleDataSet1.SetVariable('IDSERVICE',8);
// OracleDataSet1.SetVariable('OBJSCODES', '''TFIMMPATH'',''TFIMMMOTIVECONTRACTSTATE''');

Open;
end;

When i try with the ClientDataSet1 the SQL don't work when i work with directly with OracleDataSet1 all work correctly.
Why don't work with setting the params with ClientDataSet?
Fabio
 
You cannot use substitution variables in a 3-tier situation. You can only use bind variables.

------------------
Marco Kalter
Allround Automations
 
Back
Top