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.
[ODBC] 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.
Choose Start » Programs » SQL Anywhere 12 » Administration Tools » ODBC Data Source Administrator.
Click the File DSN tab.
Click Add.
In the Name list, click SQL Anywhere 12.
Click Next.
Follow the instructions in the Create New Data Source Wizard.
Click OK.
Click OK.
Discuss this page in DocCommentXchange.
|
Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0 |