0

when trying to access the value of a field it does not allow me to obtain it, I am doing it in OnFiltered of the DataSet.

procedure TFrm_Transactions.qry_personal_trxsFilterRecord(DataSet: TDataSet; var Accept: Boolean);
var
  vprs, vtrxs: string;
begin
  if qry_personal_trxs.FindField('TRANSACTIONS') = nil then
    accept := True
  else
  begin
    vprs := DataSet.FieldByName('PERSONAL').AsString;
    vtrxs := DataSet.FieldByName('TRANSACTIONS').AsString;
    accept := (vprs = vPersonal) and (pos(',' + vTransaction + ',', vtrxs) > 0);
  end;
end;
Amaudys
  • 1
  • 1
  • 1
    What is the EXACT error message you get? On which line does the error occur? – fpiette Dec 04 '20 at 20:38
  • 1
    The global reference in one branch of the if and a passed in variable in the other looks suspicious. Try replacing `qry_personal_trxs` with `dataset` so both use the passed in variable. – Brian Dec 05 '20 at 09:51
  • If you double-click the dataset in the form designer, and there are some persistent fields small window that opens, then make sure that 'TRANSACTIONS' is part of that list. If the small window is empty, then no need to add 'TRANSACTIONS'. – Gogowitsch Dec 05 '20 at 12:39
  • I was able to notice that a colleague increased the "TRANSACTIONS" field in oracle to varchar2 (2000) when it became varchar2 (250), and since the field was not added to the dataset, he put the data type memo. Thanks to Gogowitsch you can see it easier. and thank you all for helping me – Amaudys Dec 10 '20 at 16:40

0 Answers0