I use Final release of FGDBAPI.
- The Geodatabase::CreateTable can't create featureclass using the XML that exported from GetDefinition. The error code is -2147467259 and the description is "General function failure".
- The XML that exported from GetDefinition does not contain WKT and WKID tags under SpatialReference tag. There isn't way to get a spatial reference information from FGDB except using ArcGIS.
- When a featureclass is created using XML with the minimum spatial reference definition, a spatial reference does not equal to the default values of ArcGIS Desktop.
#1 & #2 Please send a copy of your feature class (lshipman@esri.com) and we will take a look. Both of these work for us.#3 ArcGIS Desktop has access to functionality not present in the API so the default values will be different.To get more error information when table creation fails add the extended error code from the following code fragment.
if ((hr = geodatabase.CreateTable(featureClassDef,L"", streetsTable)) != S_OK)
{
wcout << "An error occurred while creating the table." << endl;
ErrorInfo::GetErrorDescription(hr, errorText);
wcout << errorText << "(" << hr << ")." << endl;
// Report any extended errors (XML).
ErrorInfo::GetErrorRecordCount(recordCount);
for (int i = 0;i <= (recordCount - 1); i++)
{
ErrorInfo::GetErrorRecord(i,hr,errorText);
wcout << errorText << endl;
}
ErrorInfo::ClearErrors();
return -1;