ORA-22816

Thede

Member
Hi Marco,
Our application in Delphi 5 was running with no problems when using DOA 3.4.6.1.
Then we migrated it to Delphi 7, now using DOA 4.0.6.1, and when a transaction is applied at Oracle Database we receive the message below:

ORA-22816 unsupported feature with RETURNING clause.

We have made a test using Delphi 7 and DOA 3.4.6.1 and no errors occured...

Is there any patch for DOA 4.0.6.1 to correct this problem?

Regards,
Thede
 
I'm not aware of this problem. Do you know which statement causes this error? You can use the Oracle Monitor to find it.
 
Marco,
The problem occurs when inserting, deleting or updating records using TOracleSession.ApplyUpdates([TOracleDataset],false)...

TOracleDataset properties:

CachedUpdates := true
OracleDictionary.RequiredFields := false
QueryAllRecords := false
Variables := :PNOX, :PNOY, :PNIVEL
SQL.Text := 'SELECT ROWID, NOX, NOY
FROM REDESECUNDARIA
WHERE FONTEX = :PNOX AND FONTEY = :PNOY AND NIVEL = :PNIVEL'

where REDESECUNDARIA is a view with instead of triggers.

The same Delphi 7 code compiled with DOA 3.4.6.1 has no problems.

We have tried 4.0.6.2 version, but the problems were not solved.

Regards,
Rodrigo.
 
Hi Marco,
The statement that causes the error is:

update redesecundaria
set TEXTO = :v11
where rowid = :doa_rowid
returning rowid into :doa_rowid

Regards,
Thede.
 
I think you need to set the UniqueFields property. In that case the dataset will not use the "returning rowid into" clause to determine the rowid.
 
Thanks Marco, it worked, but why 4.0.6.2 version needs UniqueFields property and 3.4.6.1 doesn't?
Regards,
Thede.
 
Version 4.0 will try to determine a new rowid after an update. This is necessary for index organized tables. Perhaps we can make this optional in the future.
 
Back
Top