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

SAP Sybase SQL Anywhere 16.0 (中文) » MobiLink - 服务器管理 » MobiLink 服务器 API » 使用 .NET 同步脚本 » .NET 同步逻辑

 

构造函数

类的构造函数或者不带有任何参数,或者带一个 iAnywhere.MobiLink.Script.DBConnectionContext 参数。例如:

public ExampleClass(iAnywhere.MobiLink.Script.DBConnectionContext cc)

或者

public ExampleClass()

传递给您的同步上下文是针对某个连接的,MobiLink 服务器通过该连接与当前用户保持同步。

DBConnectionContext.GetConnection 方法返回的数据库连接与 MobiLink 用来与当前用户保持同步的数据库连接相同。您可以在此连接上执行语句,但是不能提交或回退事务。这些事务由 MobiLink 服务器进行管理。

MobiLink 服务器使用带有一个 iAnywhere.MobiLink.Script.DBConnectionContext 参数(如果存在)的构造函数。如果该参数不存在,则 MobiLink 服务器会使用空的构造函数。

请参见DBConnectionContext 接口 [MobiLink 服务器 .NET]