Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » MobiLink - Server Administration » Writing Synchronization Scripts in Java » MobiLink server API for Java Reference » DBConnectionContext interface

DBConnectionContext interface Next Page

getConnection method


Syntax

public java.sql.Connection getConnection( )
throws java.sql.SQLException

Remarks

Returns the existing connection with the MobiLink consolidated database as a JDBC connection. The java.sql.Connection object returned by this method represents same connection that the MobiLink server uses to execute SQL scripts.

This connection must not be committed, closed or altered in any way that would affect the MobiLink server use of this connection. The connection returned is only valid for the lifetime of the underlying MobiLink connection. Do not use the connection after the end_connection event has been called for that connection.

If an error occurs binding the existing connection as a JDBC connection then it throws java.sql.SQLException

If a server connection with full access is required, use ServerContext.makeConnection().

Returns

The existing connection with the MobiLink consolidated database as a JDBC connection.