AnsweredAssumed Answered

GetOleDbSchemaTable Fails With FileGeoDatabase

Question asked by dani72092 on Jan 5, 2016
Latest reply on Jan 4, 2017 by dani72092

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?