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

SQL Anywhere 12.0.0 (中文) » MobiLink - 入门 » MobiLink 教程 » 教程:使用 .NET 同步逻辑

 

第 3 课:用 -sl dnet 运行 MobiLink 服务器

带 -sl dnet 选项运行 MobiLink 服务器可以指定 .NET 程序集的位置,并强制在服务器启动时装载 CLR。

如果使用 Visual Studio 进行编译,则 CustdbScripts.dll 的位置是 c:\mldnet\CustdbScripts\CustdbScripts\bin\Debug。如果在命令提示符中进行编译,则 CustdbScripts.dll 的位置是 c:\mldnet

 ♦  启动 MobiLink 服务器 (mlsrv12) 并装载 .NET 程序集
  • 带 -sl dnet 选项启动 MobiLink 服务器。

    如果使用 Visual Studio 编译程序集,请运行以下命令:

    mlsrv12 -c "dsn=SQL Anywhere 12 CustDB" -dl -o c:\mldnet\cons1.txt -v+ -sl dnet(-MLAutoLoadPath=c:\mldnet\CustdbScripts\CustdbScripts\bin\Debug)

    如果在命令提示符中编译程序集,请运行以下命令:

    mlsrv12 -c "dsn=SQL Anywhere 12 CustDB" -dl -o c:\mldnet\cons1.txt -v+ -sl dnet(-MLAutoLoadPath=c:\mldnet)

    将出现一条消息,指明服务器已准备好处理请求。现在,如果同步过程中触发了 upload_insert 事件,便会执行 .NET 方法。

 进一步阅读