GetODBCDataSourceInfo()
Summary
Gets information about an ODBC data source.
Syntax
info_array = GetODBCDataSourceInfo(string odbc_data_source_name)
| Argument | Contents |
|---|---|
| odbc_data_source_name | Name of an ODBC data source |
Returns
An array consisting of either one or two elements. Each element is an array consisting of a keyword and a set of information about the ODBC source. Currently, only the two keywords listed below are supported. One or both may be returned; if both are returned, they may be returned in any order.
| Keyword | Type | Contents |
|---|---|---|
| Filespec | Array | An array of two (2) strings. The first is a short description of the data files accessed by this data source, e.g., Excel Files; the second is the default file extension preceded by a * character (e.g., "*.xls") |
| Description | String | Description string used in configuring the data source |
Notes
-
An ODBC data source can be set up with the ODBC setup or administrator program.
-
GetODBCDataSourceInfo() reads the ODBC.INI file.
-
In case of errors (e.g., if the ODBC.INI file cannot be found), GetODBCDataSourceInfo() returns null.
See Also
| Function | Summary |
|---|---|
| GetODBCDataSourceNames() | Gets an array of the names of all defined ODBC data sources |
| GetODBCTables() | Gets a list of all the tables in an ODBC data source |
| GetODBCFields() | Gets a list of all fields in an ODBC table |