Generally, on Windows-based operating systems, ODBC data sources are stored in the system registry. File data sources are an alternative; they are stored as files. On Windows, file data sources typically have the extension .dsn. They consist of sections, and each section starts with a name enclosed in square brackets.
To connect using a file data source, use the FileDataSourceName (FILEDSN) connection parameter. You cannot use both DataSourceName (DSN) and FileDataSourceName (FILEDSN) in the same connection string.
If the connection is not successful, one of two things happens:
For a new file data source The Microsoft ODBC Data Source Administrator displays a message stating that the specified file data source parameters could not be used to establish a connection. The message then asks whether or not you want to save the non-verified file. 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 Microsoft ODBC Data Source Administrator displays a message stating that the specified file data source name is invalid. 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).
You can 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.
Discuter à propos de cette page dans DocCommentXchange.
|Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1|