Hello to everybody!!
I'm using ArcGIS Pro version 2.3.2 and ArcGIS PRO SDK version 2.3.0.15769 to create a CIMSqlQueryDataConnection to be used in the creation of a FeatureLayer. The data are stored in a PostGIS database, the DB contains two schema named schema1 and schema2, inside those schemas I have placed two table with the same name so that we have:
PostGISDB
|
|_schema1
| |_table
|
|_schema2
|_table
When I invoke GetQueryDescription("PostGISDB.schema1.table") using the fully qualified name of the table the function returns the information related to the table "PostGISDB.schema2.table" instead of the information related to "PostGISDB.schema1.table"
Any hint?
Hi Mario,
How did you connect to the Database in the first place? Does the username that you used have access to schema1? When you call Database.GetTableNames(), do both tables appear in the returned list?
Thanks,
--Rich
Sorry for my delayed answer, I'm using the following code to connect to the Dabase:
this.databaseConnectionProperties = new DatabaseConnectionProperties(EnterpriseDatabaseType.PostgreSQL)
{
AuthenticationMode = AuthenticationMode.DBMS,
Database = databaseName,
User = userID,
Password = password,
Instance = host
};
this.database = new Database(this.databaseConnectionProperties);
The user has access to both the schemas and both the tables are returned by Database.GetTableNames(),