To script the creation of an ODBC data source, use the dbdsn utility.
Context and remarks
File data sources can not be created with the dbdsn utility. Use the ODBC Data Source Administrator to create file data sources. System data sources are limited to Windows-based operating systems.
Creating a system data source on 64-bit Windows 64-bit versions of Windows maintain two sets of system data sources: one for 64-bit applications and one for 32-bit applications. To create a system data source that is accessible to 32-bit applications, you must run the 32-bit dbdsn utility (located in the bin32 subdirectory in your SQL Anywhere installation directory). To avoid connection problems, set up your 32-bit system data source exactly like your 64-bit system data source.
Creating a user data source on 64-bit Windows 64-bit versions of Windows maintain one set of user data sources. You can use either the 32-bit or the 64-bit version of the dbdsn utility to create a user data source. This user data source can be used both by 64-bit and 32-bit applications as long as the matching driver is installed. For example, this user data source can be used by a 32-bit application as long as the 32-bit ODBC driver, dbodbc12.dll, is installed in %SQLANY12%. It can also be used by a 64-bit application as long as the 64-bit ODBC driver, dbodbc12.dll, is installed in %SQLANY12%.
Storing user IDs, encrypted or unencrypted passwords, and database keys in a data source is not recommended.
Run the Data Source utility (dbdsn).
For example, the following command creates an ODBC data source for the sample database. The command must be entered on one line:
dbdsn -w "My DSN" -c "DBF=$SQLANY12/demo.db"
Discuter à propos de cette page dans DocCommentXchange.
|Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1|