Lists the data sources declared on a local site. There is no need to be connected to the database to perform this operation.
// Display the accessible sources in a List Box control
ListAdd(LIST_DataList, SQLListSource())
// Display the accessible databases in a List Box control
ListAdd(LIST_DataList, SQLListSource("DATABASE"))
Syntax
Listing the data sources available for all the databases Hide the details
<Result> = SQLListSource()
<Result>: Character string
List of all available data sources. The different elements are separated by CR characters and they can be directly added into a list (ListAdd).
Listing the available databases Hide the details
<Result> = SQLListSource(<"DATABASE">)
<Result>: Character string
List of all the types of databases available on the current computer. The different elements are separated by CR characters and they can be directly added into a list (ListAdd). The possible types of databases are: | |
ACCESS | The Microsoft Jet 4 provider as well as MDAC are installed on the current computer. |
DB2 | The Native DB2 Connector is installed on the current computer. |
HYPER FILE | Access to HFSQL databases. |
HIVE | The Native Hive Connector is installed on the current computer. |
INFORMIX | The Native INFORMIX Connector is installed on the current computer. |
MariaDB | The Native MariaDB Connector is installed on the current computer. |
MYSQL | The Native MYSQL Connector is installed on the current computer. |
ODBC | The ODBC32 DLL is installed on the current computer. |
OLEDB | MDAC is installed on the current computer. |
ORACLE | The Native ORACLE Connector is installed on the current computer. |
POSTGRESQL | The Native POSTGRESQL Connector is installed on the current computer. |
PROGRESS | The Native PROGRESS Connector is installed on the current computer. |
SQL AZURE | The Native SQL AZURE Connector is installed on the current computer. |
SQL SERVER | The Native SQL SERVER Connector is installed on the current computer. Remark: The value of the H.SQLServerMode variable is taken into account. If the former Native Connector is forced and if it is not on the computer, the Native SQL Server Connector will not be listed. If the new Native Connector is forced and if it is not on the computer, the Native SQL Server Connector will not be listed. |
SYBASE | The Native SYBASE Connector is installed on the current computer. |
<"DATABASE">: Character string
"DATABASE": Character string used to list the databases available on the current computer.
Listing the data source available for a specific type Hide the details
<Result> = SQLListSource(<"DATABASE"> , <Type of database>)
<Result>: Character string
List of all data sources available for the specified type. The different elements are separated by CR characters and they can be directly added into a list (ListAdd). The possible results according to the type of database are as follows: | |
Access | Empty string. |
HYPER FILE | Empty string. We recommend that you use HListAnalysis to get the list of analyses. |
ODBC | List of ODBC databases defined in the ODBC administrator of current computer. |
OLEDB | Empty string. |
<"DATABASE">: Character string
"DATABASE": Character string used to list the data sources available for a specific type.
<Type of database>: Character string
Type of sought databases: "ODBC", ...