Obtains information about the current database connection.
public interface DBConnectionContext
All members of DBConnectionContext interface, including all inherited members.
Name | Description |
---|---|
Returns the existing connection to the MobiLink consolidated database. | |
Returns the DownloadData for the current synchronization. | |
Returns the value of the named parameter, which may be null. | |
Returns information about the network streams for a synchronization. | |
Returns the Properties for this connection based on its script version. | |
Returns the remote ID of the database currently synchronizing on this connection. | |
Returns the ServerContext for this MobiLink server. | |
Returns the version string for this connection. | |
Sets the named parameter. |
This 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 interface instead.
For more information about constructors, see Constructors.
A DBConnectionContext instance should not be used outside the thread that calls into your Java code.
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 DBConnection instance representing the current connection with the MobiLink consolidated database.
using iAnywhere.MobiLink.Script; using System.Data; public class OrderProcessor { DBConnectionContext _cc; public OrderProcessor( DBConnectionContext cc ) { _cc = cc; } // The method used for the handle_DownloadData event. public void HandleEvent() { DBConnection my_connection = _cc.GetConnection(); // ... } // ... } |
getConnection method
getDownloadData method
getNamedParameter method
getNetworkData method
getProperties method
getRemoteID method
getServerContext method
getVersion method
setNamedParameter method
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |