Return names of ODBC and JDBC data sources on system
d = getdatasources
d = getdatasources returns
the names of valid ODBC and JDBC data sources on the system as a cell
d of strings. The function gets the names
of ODBC data sources from the
ODBC.INI file located
in the folder returned by running:
myODBCdir = getenv('WINDIR')
d is empty when the
is valid, but no data sources are defined.
ODBC.INI file cannot be opened.
The function also retrieves the names of data sources that
are in the system registry but not in the
If you do not have write access to
the results of
getdatasources may not include
data sources that you recently added. In this case, specify a temporary,
writable, output folder via the preference
For details about this preference, see
getdatasources gets the names of JDBC data
sources from the file that you define using
the Define JDBC data sources dialog box.
Get the names of databases on your system.
d = getdatasources d = 'MS Access Database' 'dbtoolboxdemo'