A data source name (DSN) file is a data structure that contains the information about a specific database that an ODBC driver needs in order to connect to it. Included in the DSN, which resides either in the registry or as a separate text file, is information such as the name, directory, and driver of the database, and, depending on the type of DSN, the ID and password of the user.
You might be able to omit this section if you are using
SQL Anywhere 9
If you are using the Royalty-Free Runtime, you do need to
create the DSN as described in this part of the lesson. If you are
using the SQL Anywhere 9 (developer version) however, a DSN for
ASA 9 will already be on the device if ASA is installed with the
sample data option selected. If so, you can omit this section and
simply open the DSN file and verify that the paths used are valid. With
the Royalty-Free Runtime, the start line in the DSN points to rteng9.exe. With
ASA 9, the start line points to dbsrv9.exe.
If you are using the SQL Anywhere 9 (developer version), you do not need to create a DSN, so you can skip to “Build and deploy the application”.
Note that a DSN for ASA 9 that looks like the following will already be on the device when ASA is installed with the sample data option selected.
If you are using the Royalty-Free Runtime, open Notepad or WordPad and create a DSN file with the following content:
[ODBC] uid=dba pwd=sql enginename=ASADemo databasename=ASADemo databasefile=\Program Files\Sybase\ASA\asademo.db start=\Program Files\Sybase\ASA\rteng9.exe -q
Save the file as ASA 9.0 Sample.dsn in a temporary directory.
Copyright © 2004. Sybase Inc. All rights reserved. |
![]() |