CODBCBase.GetDataSourcesmethod
Lists available DSN / Drivers installed.
Syntax
FUNCTION GetDataSources (BYVAL Direction AS SQLUSMALLINT, BYREF dwsServerName AS DWSTRING, BYREF dwsDescription AS DWSTRING) AS SQLRETURN
Parameters
| Name | Description | |
|---|---|---|
Direction | Determines which data source the Driver Manager returns information on. Can be: SQL_FETCH_NEXT (to fetch the next data source name in the list), SQL_FETCH_FIRST (to fetch from the beginning of the list), SQL_FETCH_FIRST_USER (to fetch the first user DSN), or SQL_FETCH_FIRST_SYSTEM (to fetch the first system DSN). When Direction is set to SQL_FETCH_FIRST, subsequent calls to GetDataSources with Direction set to SQL_FETCH_NEXT return both user and system DSNs. When Direction is set to SQL_FETCH_FIRST_USER, all subsequent calls to GetDataSources with Direction set to SQL_FETCH_NEXT return only user DSNs. When Direction is set to SQL_FETCH_FIRST_SYSTEM, all subsequent calls to GetDataSources with Direction set to SQL_FETCH_NEXT return only system DSNs. | |
dwsServerName | An string variable in which to return the data source name. | |
dwsDescription | An string variable in which to return the description. |
Return value
SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.
Description
Lists available DSN / Drivers installed.
Reference
- Include file
CODBC.inc - Defined in AfxNova/COdbc.inc:226
- Documented in Databases/ODBC Classes/CODBC Class.md
- Topic: ODBC Classes