I am testing the OraDirect data proivider 3.5 and components for use in our enterprise applications as a replacement for ODP.NET. In Oracle, we create synonyms for the tables with just the table name, and use the synonyms in our SQL statements. When using the OraDirect OracleCommandBuilder to create the Insert, Update, and Delete statements, "PUBLIC." is inserted as a prefix to the table name. The CommandBuilder-generated commands fail with "Table or View does not exist" errors.
Example:
Our select statement is as follows:
select * from CUST_ACCOUNTS where CUST_ID = 'SIK17776'
The CommandBuilder creates this delete statment:
delete from PUBLIC.CUST_ACCOUNTS where CUST_ID = 'SIK17776'
OraDirect CommandBuildder appending "PUBLIC" schema to DataTable names
PUBLIC is NOT the name of the schema. Our SQL does not refer to any schema, we reference a synonym which does not have a schema defined in it. The OraDirect CommandBuilder is adding an arbitrary schema name where one does not exist.
As a point of reference the Oracle ODP.NET CommandBuilder does not exhibit this behavior.
As a point of reference the Oracle ODP.NET CommandBuilder does not exhibit this behavior.