On FormCreate, the TOraTable's FilterSQL is set. A Stored Proc is called that and one of the things the proc does it to make adjustments to one or more fields on the current record. It the stored proc returns ok, then the changes are commited and a call to RefreshRecord is made. "ORA-00900: invalid SQL statement" occurs.
procedure TAdjustForm.FormCreate(Sender: TObject);
begin
....
if (Data.LPID '') then
HDR.FilterSQL := Format('LPID = ''%s''', [Data.LPID]);
....
end;
procedure TAdjustForm.btnAdjustClick(Sender: TObject);
var
.....
begin
....
Data.BeginTran;
with prcAdjustPlate do
begin
{Parameters set}
Prepare;
ExecProc;
if (ParamByName('OUT_ERRORNO').Value = 0) then
begin
Data.CommitTran;
HDR.RefreshRecord; <<-- Error thrown at this call.
.......
end;
......
end;
SQL as caught by DBMonitor:
At FormCreate:
SELECT *
FROM PLATE
WHERE LPID = '000000000001001'
ORDER BY LPID
At RefreshRecord:
WHERE AND PLATE.LPID = :LPID