API 4- Final release date

3150
3
05-30-2011 11:13 AM
eykim
by
New Contributor
Hello,

I'm just wondering if you have any idea when API 4- Final release will be released? I believe the latest blog entry said mid-may..

The other question is: I got a file geodatabase amphibian and tried to open it using file geodatabase api, but got "General function failure" message. Since we don't have access to source code, more specific error message than "General function failure" will be appreciated. Do you mind taking a look at my file geodatabase (it is way to big to post on this forum.)

Thanks.
0 Kudos
3 Replies
LanceShipman
Esri Regular Contributor
We expect to have final posted sometime today.

I'd be happy to look at your file geodatabase. Send a zipped copy to me at lshipman@esri.com or place a copy of it on the esri ftp site. Is it a 10.0 file geodatabase? If not, you can't open it.

You may be able to get extended error information by using the following code:

  fgdbError hr;
  wstring errorText;
  Geodatabase geodatabase;
  int recordCount = 0;
  if ((hr = OpenGeodatabase(L"../data/Querying.gdb", geodatabase)) != S_OK)
  {
    wcout << "An error occurred while opening the geodatabase." << 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;
  }


This is particularly helpful when creating a table as XML parsing errors are reported via this mechanism.
0 Kudos
eykim
by
New Contributor
The amphibians db I got is from a remote site.

http://www.iucnredlist.org/spatial-data/2010.4/GISData/All_AMPHIBIANS_Oct2010.gdb.zip

So, I've tried to get an error description xml but the error count I got was 0 and and the xml returns empty string. Funny thing is I can open the file in ArcMap.

Thank you for looking into this.


if ((hr = OpenGeodatabase(L"C:/All_AMPHIBIANS_Oct2010.gdb", geodatabase2)) != S_OK)
  { 
        std::wstring oErrDesc, oErrXML;
        FileGDBAPI::ErrorInfo::GetErrorDescription (hr, oErrDesc);
        wcout << "An error occurred while opening the geodatabase." << endl;
        wcout << oErrDesc << endl;
       
        // Report any extended errors (XML).
        int nErrRecordCnt;
        FileGDBAPI::ErrorInfo::GetErrorRecordCount(nErrRecordCnt);
 
        for (int i = 0;i <= (nErrRecordCnt - 1); i++)
        {
            FileGDBAPI::ErrorInfo::GetErrorRecord(i,hr,oErrXML);
            wcout << oErrDesc << endl;
        }
     
      return hr;
  }

0 Kudos
LanceShipman
Esri Regular Contributor
Final returns the following error: This release of the GeoDatabase is either invalid or out of date.(-2147220965).

The file geodatabase is a 9.3 geodatabase. The API only supports 10.0 or later. You need to upgrade the file geodatabase to 10.0.

Final has been posted to the resources site.
0 Kudos