Support for Oracle Database Links with StoreGeneratedPattern
If you use Entity Framework and the StoreGeneratedPattern for ROWID, ORA_ROWSCN or any other fields (no primary key fields), there is a problem if you have tables available over a database link. This can be done by creating a synonym that points to a table on another oracle database (@dblink).
Devart creates a returning clause for getting values back, but this is not a supported feature with database links and leads into an ora-22816.
Is it possible to implement an option in Devart so that such columns are always read back over a select statement instead of a returning clause? This is not as fast as the returning clause but can help in such a situation.
The select statement should use the key fields (Entity Framework) to get these values back and the key fields must not have the StoreGeneratedPattern property set to get that work.
Example Table:
create table testtable
(
id number primary key,
calculated number,
text varchar2(1000)
)
StoreGeneratedPattern Settings:
Id - None
Calculated - Computed
Text - None
Example PL/SQL:
BEGIN
Insert into testable(id, calculated, text) values (:ID, :CALCULATED, :TEXT);
Select calculated into :OutParameter from testable where id = :ID;
END;
![](https://secure.gravatar.com/avatar/f2f45779c843f7be8f3f562d57057639?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)
-
Devart Team commented
New version of dotConnect for Oracle 7.9 is released!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=1&t=27875 . -
Devart Team commented
The config.DmlOptions.UseReturningClause configuration option (default value is True) is added to provide the possibility to turn off generation of RETURNING clause when obtaining database-generated values with INSERT/UPDATE commands. We will post here when the corresponding build of dotConnect for Oracle is available for download.
-
Tobsel commented
Hello,
is there anything new about that? We need that for primary key columns! -
xerxes commented
Competition Series amplifiers Kits ck0dz 100% made of nickel?
-
AdminDevart (_, Devart) commented
This approach can be used with computed columns, however it cannot be used for Identity (Primary Key) columns. We will study the possibility to implement such dblink support for computed columns.