ODAC 6.00.0.5: Problem with TOraTable FilterSQL on call to RefreshRecord

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
mikeho
Posts: 41
Joined: Thu 11 Nov 2004 21:23
Location: Middle Tennessee USA

ODAC 6.00.0.5: Problem with TOraTable FilterSQL on call to RefreshRecord

Post by mikeho » Fri 20 Apr 2007 18:33

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

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Mon 23 Apr 2007 09:02

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.

Post Reply