The server-side connection example is almost identical to the client-side connection example, with the following exceptions:
The driver manager does not need to be loaded. The following code has been removed from the example.
DriverManager.registerDriver( (Driver) Class.forName( // "com.sybase.jdbc3.jdbc.SybDriver").newInstance() "ianywhere.ml.jdbcodbc.IDriver").newInstance() );
It connects to the default running database using the current connection. The URL in the getConnection call has been changed as follows:
Connection con = DriverManager.getConnection( "jdbc:default:connection" );
System.exit() statements have been removed.
|Discuss this page in DocCommentXchange.
Send feedback about this page using email.
|Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1|