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; }
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; }
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.