Hi:

I have the follow SQL in my TOracleDataset

>> Select T1.RowId, T1.*
>> From UCS_PACCESS T1
>> Where (t1.APP_ID = :APP_ID1 or 0=:APP_ID2) and
>> T1.PROF_ID = :PROF_ID
>>
>> ORDER BY T1.APP_ID, T1.FORM_ID, T1.COMP_ID

When I try to open it for the second time, it gives me a ORA-01036 error. The code where the error is raise is:

with qryPAccess do
begin
Close;
SetVariable('PROF_ID',PROF_ID);
SetVariable('APP_ID1',0);
SetVariable('APP_ID2',0);
CachedUpdates:=True;
Open;
end;

I'm using 4.0.6.2 evaluation version with D5.

Any tips?

Thanks.

Jackson Gomes
Tools&Comps - Security Components for Borland Developers.
Web Site: http://www.toolsandcomps.com
Our Forum: http://groups.yahoo.com/group/toolsandcomps
e-mail: jackson@toolsandcomps.com
Phone: 55 27 99602760 / 55 27 33891138