File Geodatabase API
C:/FileGDB_API/include/GeodatabaseManagement.h File Reference

A set of functions for accessing, creating and deleting file geodatabases. More...

Functions

EXT_FILEGDB_API fgdbError CreateGeodatabase (const std::wstring &path, Geodatabase &geodatabase)
 Creates a new 10.x file geodatabase in the specified location.
EXT_FILEGDB_API fgdbError OpenGeodatabase (const std::wstring &path, Geodatabase &geodatabase)
 Opens an existing 10.x file geodatabase.
EXT_FILEGDB_API fgdbError CloseGeodatabase (Geodatabase &geodatabase)
 Closes an open file geodatabase.
EXT_FILEGDB_API fgdbError DeleteGeodatabase (const std::wstring &path)
 Deletes a file geodatabase.

Detailed Description

A set of functions for accessing, creating and deleting file geodatabases.


Function Documentation

EXT_FILEGDB_API fgdbError CreateGeodatabase ( const std::wstring &  path,
Geodatabase &  geodatabase 
)

Creates a new 10.x file geodatabase in the specified location.

If the file geodatabase already exists a -2147220653 (The table already exists) error will be returned. If the path is seriously in error, say pointing to the wrong drive, a -2147467259 (E_FAIL) error is returned.

Parameters:
[in]pathThe location where the geodatabase should be created.
[out]geodatabaseA reference to the newly-created geodatabase.
Returns:
Error code indicating whether the method finished successfully.
EXT_FILEGDB_API fgdbError OpenGeodatabase ( const std::wstring &  path,
Geodatabase &  geodatabase 
)

Opens an existing 10.x file geodatabase.

If the path is incorrect a -2147024894 (The system cannot find the file specified) error will be returned. If the release is pre-10.x a -2147220965 (This release of the GeoDatabase is either invalid or out of date) error will be returned.

Parameters:
[in]pathThe path of the geodatabase.
[out]geodatabaseA reference to the opened geodatabase.
Returns:
Error code indicating whether the method finished successfully.
EXT_FILEGDB_API fgdbError CloseGeodatabase ( Geodatabase &  geodatabase)

Closes an open file geodatabase.

Parameters:
[in]geodatabaseA reference to the geodatabase.
Returns:
Error code indicating whether the method finished successfully.
EXT_FILEGDB_API fgdbError DeleteGeodatabase ( const std::wstring &  path)

Deletes a file geodatabase.

If the path is incorrect a -2147024894 (The system cannot find the file specified) error will be returned. If another process has a lock on the geodatabase, a -2147220947 (Cannot acquire a lock) error will be returned. If access is denied an E_FAIL is returned.

Parameters:
[in]pathThe path of the geodatabase.
Returns:
Error code indicating whether the method finished successfully.