Data Sources

To specify an ODBC data source it is necessary to specify some subset of a number of different items: driver, server, database, dbq, user, password.

There are four different ways to do this.

  1. Specify a System DSN
  2. Specify a User DSN
  3. Specify a File DSN
  4. Specify all the details yourself

A DSN is a data source name. It is a reference to a previously configured specification for the type and location of a data source. The difference between System, User and File DSNs is a matter of scope and how the details are stored.

If you use the ODBC Administrator to create a DSN it will simplify your referring to a database. ODBC Administrator may be found under the Windows Control Panel / Data Sources (ODBC) or Adminstative Tools / Data Sources (ODBC)

A configuration using a DSN that you have already defined will be simply:

<query> <dsn>MyDSN</dsn> <sql>Select * From MyTable Order By X</sql> <query>