Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 12.0.0 » SQL Anywhere Server - Database Administration » Starting and connecting to your database » SQL Anywhere database connections » Creating ODBC data sources


Using file data sources on Windows

Generally, on Windows-based operating systems, ODBC data sources are stored in the system registry. File data sources are an alternative, which are stored as files. In Windows, file data sources typically have the extension .dsn. They consist of sections, each section starting with a name enclosed in square brackets.

To connect using a File Data Source, use the FileDataSourceName (FILEDSN) connection parameter. You can not use both DataSourceName (DSN) and FileDataSourceName (FILEDSN) in the same connection.

To successfully create a File Data Source, you must be able to establish a connection to the database for which you are creating a File Data Source.

If the connection is not successful, one of two things will happen. For a new File Data Source, the Microsoft ODBC Data Source Administrator will display the message "A connection could not be made using the file data source parameters entered. Save non-verified file DSN?". If you choose to save the File Data Source, the ODBC Data Source Administrator writes only the following lines to the file.

DRIVER=SQL Anywhere 12

The driver string varies with the version of SQL Anywhere. For an existing File Data Source, the ODBC Data Source Administrator displays the message General error: Invalid file dsn 'file-data-source.dsn'. The File Data Source is not updated by the ODBC Data Source Administrator.

If the connection is successful, the new or updated File Data Source is written to disk by the ODBC Data Source Administrator, but the PWD=password parameter is not included (and is removed if it was previously present in the file).


Use File Data Sources to distribute the file to users and simplify the management of multiple user connections. If the file is placed in the default location for file data sources, it is picked up automatically by ODBC.

 To create an ODBC file data source (ODBC Data Source Administrator)
  1. Choose Start » Programs » SQL Anywhere 12 » Administration Tools » ODBC Data Source Administrator.

  2. Click the File DSN tab.

  3. Click Add.

  4. In the Name list, click SQL Anywhere 12.

  5. Click Next.

  6. Follow the instructions in the Create New Data Source Wizard.

  7. Click OK.

  8. Click OK.