ThinkGeo.com    |     Documentation    |     Premium Support

V14.3 - ESRI FileGeoDatabase

ThinkGeo Team,

In V12.1 code in regard to FileGeoDatabase worked just fine. However, under V14.3.0-beta071 I am encountering the exception below. The exception is occurring on the Open.

I then upgraded to V14.3.0-beta090, which introduced a compile error, namely that

          TheDatabaseTableNames = TheFileGeoDatabaseFeatureLayer.LayerNames;

In V14.3.–beta090 LayerNames is no longer a property of–>>
FileGeoDatabaseFeatureLayer.

My FileGeoDatabaseFeatureLayer contains multiple layers, hence the use of the LayerNames Collection.

And this worked just fine under V12.1 and no code changes were made for V14.3.0

Thanks,
Dennis

2025-03-11 21:47:31,182 ERROR OriStarFileDatabaseViewer - OriStarFileDatabaseViewer->GeneralMethods.PopulateDatabaseCollectionGdb:
Unable to get TheFileGeoDatabaseFeatureLayer.LayerNames Collection
Database=C:\OriStar\xxxx\OriStarVisionMapSuite\MapGeoDatabase\Airport.gdb
Source=Esri.FileGDBAPI
TargetSite=Esri.FileGDB.Table OpenTable(System.String)
StackTrace= at Esri.FileGDB.Geodatabase.OpenTable(String path)
at GRU=.R0I=.VUI=(String pathName, String tableName)
at GRU=.R0I=.VUI=()
at GRU=.R0I=.KB8=()
at ThinkGeo.Core.FileGeoDatabaseFeatureSource.OpenCore()
at ThinkGeo.Core.FeatureSource.Open()
at ThinkGeo.Core.FeatureLayer.OpenCore()
at ThinkGeo.Core.Layer.Open()
at OriStarFileDatabaseViewer.GeneralMethods.PopulateDatabaseCollectionGdb(String TheFile, String TheFilePath, String TheFileName, String TheFileTypeUpCase) in C:\OriStarMappingIncThinkGeoUI-V14.3.0Secondary\OriStarFileDatabaseViewer\TheGeneralMethods.cs:line 503
Message=The table was not found.
Esri.FileGDB.FileGDBException: The table was not found.
at Esri.FileGDB.Geodatabase.OpenTable(String path)
at GRU=.R0I=.VUI=(String pathName, String tableName)
at GRU=.R0I=.VUI=()
at GRU=.R0I=.KB8=()
at ThinkGeo.Core.FileGeoDatabaseFeatureSource.OpenCore()
at ThinkGeo.Core.FeatureSource.Open()
at ThinkGeo.Core.FeatureLayer.OpenCore()
at ThinkGeo.Core.Layer.Open()
at OriStarFileDatabaseViewer.GeneralMethods.PopulateDatabaseCollectionGdb(String TheFile, String TheFilePath, String TheFileName, String TheFileTypeUpCase) in C:\OriStarMappingIncThinkGeoUI-V14.3.0Secondary\OriStarFileDatabaseViewer\TheGeneralMethods.cs:line 503

Hi Dennis,

Please use the static method instead:

  var tableNames = FileGeoDatabaseFeatureLayer.GetTableNames(@"./Data/zoning.gdb");

It makes more sense than the old way, as a FileGeoDatabaseFeatureLayer stands for a specific data table in the database, it’s a bit weird a layer returns the name of the other tables.

Also you should see performance improvements on FileGeoDatabaseFeatureLayer.

Let us know if you see any more issues.

Thanks,
Ben

Thanks Ben. This works just fine.

Dennis

That’s great! :+1: :+1: