To connect to a database via the iAnywhere JDBC driver, you need to supply a URL for the database. For example:
Connection con = DriverManager.getConnection( "jdbc:ianywhere:DSN=SQL Anywhere 11 Demo" ); |
The URL contains jdbc:ianywhere: followed by a standard ODBC connection string. The connection string is commonly an ODBC data source, but you can also use explicit individual connection parameters, separated by semicolons, in addition to or instead of the data source. For more information about the parameters that you can use in a connection string, see Connection parameters.
If you do not use a data source, you should specify the ODBC driver to use by including the DRIVER parameter in your connection string:
Connection con = DriverManager.getConnection( "jdbc:ianywhere:driver=SQL Anywhere 11;..." ); |
Discuss this page in DocCommentXchange. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |