I am getting an ORA-00942 error when I execute the procedure depicted below which uses TOracleDataset components. I am obtaining data from Table1, creating or updating a record in Table2, and then updating a value on the current record in Table1. The record is available and everything works correctly until the edit/update/post for Table1 is started. The exception occurs as soon as the edit is executed.
I needed a 64 bit version of an existing program. The original program did not have this behavior. The message makes no sense to me as I already have the record and just need to update it.
Please Advise.
Here is pseudo code for my process
try
with Table1 do
begin
Active := True;
First;
while not Eof do
begin
Extract Data and do calculations using Table1 fields;
with Table2 do
begin
Append or update a record unrelated to table1;
end;
//--> ORA-00942 occurs when this edit is executed
Edit;
FieldByName('DateValue').AsDateTime := Now;
Post;
Next;
end;
Active := False;
end;
except
Log Exception;
end;
Here is what the SQL for Table 1 is like:
select t.*,t.rowid,b.*
from p_trans@a.j.gov t,
b_refund@a.j.gov b
where t.criteria = ...........
and b.source = t.source
I have UpdatingTable set to p_trans. I have CountAllRecords set to True.