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)