DBConnectionContext interface

Syntax
public ianywhere.ml.script.DBConnectionContext
Remarks

Interface 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.

See also
Members

All members of ianywhere.ml.script.DBConnectionContext, including all inherited members.

Example

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();
        // ... 
    }

    // ...
}
Caution

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