I have a client dataset, through a provider to an oracle dataset. There are three variables/ parameters which set within the program to select the data. The sql on the ods is:
select var.*,var.rowid from vleAction var
where riskcat = :riskcat and riskdrv = :riskdrv and eventbatch = :eventbatch
and reqtkn = 'R'
this appears in the monitor variables window
RISKCAT EX
RISKDRV 22
EVENTBATCH 000001
if I substitute these values and execute the sql I get 2 rows.
All I can imagine is that the riskdrv is being translated to a string when it should be an integer.
This is driving me
it should be so simple.
More information:
If I build the sql in the code instead of using parameters it retrieves 2 rows.
dmVLEdb.odsAActR.SQL.Text:=
'select var.*,var.rowid from vleAction var '
+'where riskcat = '''+dmVLEdb.cdsQualRISKCAT.AsString+''' and '
+'riskdrv = '+dmVLEdb.cdsQualRISKDRV.AsString+' and '
+'eventbatch = '''+dmVLEdb.cdsQualBATCHID.AsString+'''and reqtkn = ''R''';
which gives ...
select var.*,var.rowid from vleAction var where riskcat = 'EX' and riskdrv = 22 and eventbatch = '000001'and reqtkn = 'R'
in the monitor.
select var.*,var.rowid from vleAction var
where riskcat = :riskcat and riskdrv = :riskdrv and eventbatch = :eventbatch
and reqtkn = 'R'
this appears in the monitor variables window
RISKCAT EX
RISKDRV 22
EVENTBATCH 000001
if I substitute these values and execute the sql I get 2 rows.
All I can imagine is that the riskdrv is being translated to a string when it should be an integer.
This is driving me

More information:
If I build the sql in the code instead of using parameters it retrieves 2 rows.
dmVLEdb.odsAActR.SQL.Text:=
'select var.*,var.rowid from vleAction var '
+'where riskcat = '''+dmVLEdb.cdsQualRISKCAT.AsString+''' and '
+'riskdrv = '+dmVLEdb.cdsQualRISKDRV.AsString+' and '
+'eventbatch = '''+dmVLEdb.cdsQualBATCHID.AsString+'''and reqtkn = ''R''';
which gives ...
select var.*,var.rowid from vleAction var where riskcat = 'EX' and riskdrv = 22 and eventbatch = '000001'and reqtkn = 'R'
in the monitor.