Databases Reference
In-Depth Information
For a machine data source, the DSN is stored in the system registry of a machine under a
specific name, called the Data Source Name name (DSN name). A machine data source
can be registered under one of two registry keys:
HKEY_LOCAL_MACHINE/SOFTWARE/ODBC/ODBC.INI
HKEY_CURRENT_USER/SOFTWARE/ODBC/ODBC.INI
In the former case, the DSN is available to all users of the machine. In the latter case, the
DSN is available only to the user under whose name it is registered. When a DSN is
stored in the HKEY_LOCAL_MACHINE key, the data source is referred to as a system data
source , although again this term should really be applied to the DSN. When the DSN is
stored in the HKEY_CURRENT_USER key, the data source (actually DSN) is referred to as a
user data source .
Incidentally, the registry key HKEY_LOCAL_MACHINE/SOFTWARE/ODBC/ODBCINST.INI
contains information about each installed ODBC component, including drivers. This is a
good place to find the filename of a driver, should you be interested.
C.4.1.2 File data sources
For a file data source, the DSN is kept in an ordinary text file, with extension .dsn , and is
accessible to anyone with access to the file. This is so that a file data source (that is, a file
DSN) is not registered to any one user or machine. Thus, a file DSN does not have a DSN
name per se (under which it is registered). It does have a filename, of course.
Figure C-2. The ODBC Administrator
Search WWH ::




Custom Search