CPLODBCDriverInstaller Class Reference
#include <cpl_odbc.h>
List of all members.
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 |
Detailed Description
A class providing functions to install or remove ODBC driver.
Member Function Documentation
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.
- Parameters:
-
| 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 |
- Returns:
- TRUE indicates success, FALSE if it fails.
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.
- Parameters:
-
| 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. |
- Returns:
- The function returns TRUE if it is successful, FALSE if it fails. If no entry exists in the system information when this function is called, the function returns FALSE. In order to obtain usage count value, call GetUsageCount().
The documentation for this class was generated from the following files: