Page 1 of 1

ODAC 6.00.0.5: Problem with TOraTable FilterSQL on call to RefreshRecord

Posted: Fri 20 Apr 2007 18:33
by mikeho
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

Posted: Mon 23 Apr 2007 09:02
by Plash
We could not reproduce the problem. Please send to odac*crlab*com a complete small sample that demonstrates the problem, including script to create server objects.