Data Source Name

The Data Source Name ( DSN) is a data structure (similar to a URL or file path), which in database abstraction frameworks ( database abstraction layer) such as ODBC (Open Database Connectivity), JDBC or ADOdb the access describes that requires a driver to connect to a establish specific database based on a specific RDBMSs.

The DSN contains information such as the name, the directory and the driver of the database and, based on the type of DSN, the ID and password of the user.

Depending on the framework, the notation of the DSN so distinct in part:

Various notations

JDBC

Mysql :/ / root: rootpw @ localhost / MyDatabase ODBC

For ODBC DSNs exist different forms of representation. Either the DSN ' hard-wired ' and incorporated as a DSN -less connection directly in the program code. Then, the display is as follows:

DBQ = C: \ TEST \ QUERY FILES; DefaultDir = C: \ TEST \ QUERY FILES; _    Deleted = 1; Driver = { Microsoft dBase Driver (* dbf. ) }; _    DriverId = 277; FIL = dBase IV; Page Timeout = 600; Statistics = 0 In addition, there is the possibility to save the DSN in the registry ( in older versions of MS- Query) or in so-called file DSNs. This term is chosen to be somewhat unhappy by Microsoft, as it is not a DSN reference ON is a file (eg XML file) but a DSN reference IN a file.

Accordingly, a file DSN or a DSN file containing data in a notation similar to an ini file. :

[ ODBC]    DRIVER = Microsoft Excel Driver (*. Xls)    UID = admin    UserCommitSync = Yes    Threads = 3    Safe Transactions = 0    ReadOnly = 1    Page Timeout = 5    MaxScanRows = 8    MaxBufferSize = 512    ImplicitCommitSync = Yes    FIL = excel 5.0    DriverId = 790    DefaultDir = : \    DBQ = : \ ODBC distinguishes three types of DSN:

  • User DSN (User DSN)
  • System DSN ( DSN Machine )
  • File (DSN File DSN)

User and system DSNs are specific computer and save the DSN information in the registry. A User DSN allows database access for a single user on a single computer, a System DSN for each user of a particular computer. A File DSN contains relevant information in a text file with a. DSN file extension and can be used by multiple users and multiple computers if they have installed the same database drivers.

219545
de