GetOleDbSchemaTable Fails With FileGeoDatabase

1798
1
01-05-2016 09:20 AM
New Contributor II

I'm trying to extend some existing code to support FGDB connections, but I'm getting an unhelpful error when I try to make calls using my connection. I have an open connection and am trying to call GetOleDbSchemaTable in a try/catch. The application runs as an ArcMap extension and this portion of the code runs after everything has loaded.

Connection String: "Provider=ESRI.GeoDB.OleDB.1; DATA SOURCE = C:\Projects\Demo\Workspaces\FGDB.gdb; Extended Properties=workspacetype=esriDataSourcesGDB.FileGDBWorkspaceFactory.1; Geometry=WKB"

DataTable table = cnn.GetOleDbSchemaTable(System.Data.OleDb.OleDbSchemaGuid.Columns, new object[] { null, null, tableName, null });

Could not retrieve schema information for table tableName due to an error: 'ESRI.GeoDB.OleDB.1' failed with no error message available, result code: DB_E_NOTSUPPORTED(0x80040E53).

I was using this older forum post as a reference Importing data from a File GeoDatabase

It seems like you can select on the OleDbSchemaGuid.Tables, but not the OleDbSchemaGuild.Columns. Is this unsupported?

Reply
0 Kudos
1 Reply
New Contributor II

We continue to battle with the ESRI.GeoDB.OleDB.1 provider. The documentation is severely lacking, and the functionality seems equally lacking, from my experience thus far.

Reply
0 Kudos