OGR
|
#include <cpl_odbc.h>
Public Member Functions | |
int | InstallDriver (const char *pszDriver, const char *pszPathIn, WORD fRequest=ODBC_INSTALL_COMPLETE) |
int | RemoveDriver (const char *pszDriverName, int fRemoveDSN=FALSE) |
int | GetUsageCount () const |
const char * | GetPathOut () const |
const char * | GetLastError () const |
DWORD | GetLastErrorCode () const |
A class providing functions to install or remove ODBC driver.
|
inline |
If InstallDriver returns FALSE, then GetLastError then error message can be obtained by calling this function. Internally, it calls ODBC's SQLInstallerError function.
|
inline |
If InstallDriver returns FALSE, then GetLastErrorCode then error code can be obtained by calling this function. Internally, it calls ODBC's SQLInstallerError function. See ODBC API Reference for possible error flags.
|
inline |
Path of the target directory where the driver should be installed. For details, see ODBC API Reference and lpszPathOut parameter of SQLInstallDriverEx
|
inline |
The usage count of the driver after this function has been called
int CPLODBCDriverInstaller::InstallDriver | ( | const char * | pszDriver, |
const char * | pszPathIn, | ||
WORD | fRequest = ODBC_INSTALL_COMPLETE |
||
) |
Installs ODBC driver or updates definition of already installed driver. Interanally, it calls ODBC's SQLInstallDriverEx function.
pszDriver | - The driver definition as a list of keyword-value pairs describing the driver (See ODBC API Reference). |
pszPathIn | - Full path of the target directory of the installation, or a null pointer (for unixODBC, NULL is passed). |
fRequest | - The fRequest argument must contain one of the following values: ODBC_INSTALL_COMPLETE - (default) complete the installation request ODBC_INSTALL_INQUIRY - inquire about where a driver can be installed |
References CPL_UNUSED, CPLAssert, CPLDebug(), and CPLMalloc().
int CPLODBCDriverInstaller::RemoveDriver | ( | const char * | pszDriverName, |
int | fRemoveDSN = FALSE |
||
) |
Removes or changes information about the driver from the Odbcinst.ini entry in the system information.
pszDriverName | - The name of the driver as registered in the Odbcinst.ini key of the system information. |
fRemoveDSN | - TRUE: Remove DSNs associated with the driver specified in lpszDriver. FALSE: Do not remove DSNs associated with the driver specified in lpszDriver. |
References CPLAssert.