public ianywhere.ml.script.DBConnectionContextInterface for obtaining and accessing information about the current database connection. A DBConnectionContext instance is passed to the constructor of classes containing scripts. If context is required for a background thread or beyond the lifetime of a connection, use the ServerContext class.
All members of ianywhere.ml.script.DBConnectionContext, including all inherited members.
The following example shows you how to create a class level DBConnectionContext instance to use in your synchronization scripts. The DBConnectionContext getConnection method obtains a java.sql.Connection instance representing the current connection with the MobiLink consolidated database.
import ianywhere.ml.script.*;
import java.io.*;
import java.sql.*;
public class OrderProcessor {
DBConnectionContext _cc;
public OrderProcessor(DBConnectionContext cc) {
_cc = cc;
}
// The method used for the handle_DownloadData event.
public void HandleEvent() throws SQLException {
java.sql.Connection my_connection = _cc.getConnection();
// ...
}
// ...
} |
A DBConnectionContext instance should not be used outside the thread that calls into your Java code.
getConnection method
getDownloadData method
getProperties method
getRemoteID method
getServerContext method
getVersion method
| Discuss this page in DocCommentXchange. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |