ThinkGeo.com    |     Documentation    |     Premium Support

FileGeoDatabaseFeatureSource.CreateTable() produces 'General function failure' exception

Using version 14.3.2 I am consistently getting a “Esri.FileGDB.FileGDBException: ‘General function failure.’” error in our application. I have whipped up a simplified example using your HowDOI example and am still getting the exception.

        private void CreateGdb()
        {
            if (!System.IO.Directory.Exists(@"K:\gdbtemptest\TestGDB.gdb"))
            {
                FileGeoDatabaseFeatureSource.CreateFileGeoDatabase(@"K:\gdbtemptest\TestGDB.gdb");
            }
            
            FileGeoDatabaseFeatureSource.CreateTable(@"K:\gdbtemptest\TestGDB.gdb", "zoning", WellKnownType.Multipolygon, new string[] { "zoning", "pd", "sup", "ord1", "ord2" });
        }

With the following (truncated) stack trace:

Unhandled Exception: Esri.FileGDB.FileGDBException: General function failure.
at Esri.FileGDB.Geodatabase.CreateTable(String tableDef, String parent)
at 9xQ=.lj8=.pj8=(String fileGeoDatabasePathName, String tableName, WellKnownType wellKnownType, IEnumerable1 columns, String esriCoordinateSystem) at ThinkGeo.Core.FileGeoDatabaseFeatureSource.CreateTable(String fileGeoDatabasePathName, String tableName, WellKnownType wellKnownType, IEnumerable1 columns, String esriCoordinateSystem)
at GeoCarta.Test.ThinkGeoTestBed.MainWindow.CreateGdb() in K:\src\core-trunk\GeoCarta\Test\ThinkGeoTestBed\src\TestBed\MainWindow.xaml.cs:line 186
at GeoCarta.Test.ThinkGeoTestBed.MainWindow.d__2.MoveNext() in K:\src\core-trunk\GeoCarta\Test\ThinkGeoTestBed\src\TestBed\MainWindow.xaml.cs:line 77

Any ideas? Maybe something related to column constraints?

Hi Sean,

Are you able to attach the .gdb to this post so I can try and recreate the issue? Or, you can also open a ticket on https://helpdesk.thinkgeo.com and attach your dataset there if you want to keep the dataset private.

Thanks,
John

Hi John,

Thanks for getting back to me. What I am trying to accomplish here is creating a new .gdb and adding a new table to that newly created .gdb.

The call to FileGeoDatabaseFeatureSource.CreateFileGeoDatabase() appears to be working as it creates what appears to be an empty .gdb in the file system but the subsequent call, FileGeoDatabaseFeatureSource.CreateTable() gives the aforementioned error. I have attached the ‘empty’ .gdb that the CreateFileGeoDatabase() call generates.

Thanks again for getting back to me.

TestGDB.gdb.zip (18.3 KB)

Thanks Sean,

We’ve recreated the issue and are working on a fix. I’ll let you know what we find.

Thanks,
John

Hi Sean,

It turned out to be a bug and we’ve just fixed in the latest beta 14.5.0-beta002, please pull the latest and have another try.

Thanks,
Ben

Hi Ben,

14.5.0-beta002 worked in my test bed, looking forward to integrating it into our app in the 14.5.0 release.

Thank you,
Sean

Hi Sean,

You don’t need to wait for v14.5 as this fix will be included in the upcoming hotfix (v14.4.1) as well, just keep an eye on the nuget.

Thanks,
Ben