Posted By: TLSI2000 DOA TOracleTable - SequenceField - 08/17/22 05:07 PM
Delphi XE 10.1 Berlin
DOA v4.4.1.0
Oracle 21c
accessing a Pluggable Database


Component: TOracelDataset
Property: SequenceField

Using the older version for Oracle 11, the SequenceField can be set for a sequence named GEN_VALUE from the drop-down list in the wizard.
The previous version worked well for running against Oracle v10 and v11.

In current version of component, the SequenceField property must now include the 'owner': DBO.GEN_VALUE which has to be edited manually in the Object Inspector.
else an exception on the sequence will be thrown.as it cannot be found ( does not exist).

This occurs even though the program user ( not the owner user ) has full permissions to do a SELECT on the sequence.

The 'wizard' that sets the field does show the sequence available, but does not show nor set the 'owner' portion of the property.
Posted By: TLSI2000 Re: DOA TOracleTable - SequenceField - 08/17/22 05:35 PM
This turns out to be a developer error and assumption.

I program with the OWNER user for connection to the database, so the drop-down list of Sequences shows the SequenceName as a non-owner-qualified version.

When changing the development connection to a program-user ( NOT the database owner ), then the Sequence drop-down list shows correctly with the "Owner.SequenceName" format.

So, when using a different user in development rather than a program-user, then this needs to be understood that the drop-down list MAY BE DIFFERENT THAN WHAT IS REQUIRED AT RUN TIME.

I would suggest that the Sequence drop-down list ALWAYS qualify the SequenceName with the owner to resolve others from this in the future.

thx.
© Allround Automations forums