SQL Anywhere connection parameters in an ODBC data source

You can use an ODBC data source to connect to a database. The ODBC data source resides on the client computer.

The ODBC data source contains a set of connection parameters. You can store sets of SQL Anywhere connection parameters as an ODBC data source, in either the Windows registry or as files.

For SQL Anywhere, the use of ODBC data sources goes beyond Windows applications using the ODBC interface:

  • SQL Anywhere client applications on Unix and Windows operating systems can use ODBC data sources.

  • ODBC data sources can be used by all SQL Anywhere client interfaces except jConnect and Sybase Open Client. The data source is stored in a file on Unix and Windows Mobile operating systems.

If you have a data source, your connection string can name the data source to use:

  • Data source name   Use the DataSourceName (DSN) connection parameter to reference a data source in the Windows registry:
    DSN=my-data-source

  • File data source   Use the FileDataSourceName (FILEDSN) connection parameter to reference a data source held in a file:
    FileDSN=mysource.dsn

Note

If a connection string and an ODBC data source both specify the same connection parameter, the value from the connection string is used and the value from the data source is ignored. See Connection parameter syntax rules.

 See also