本课假定您已完成前面的所有课程。 请参见第 1 课:利用 MobiLink 参考编译 CustdbScripts.dll 程序集。
在本课中,您将使用 -sl dnet 选项运行 MobiLink 服务器,以指定 .NET 程序集的位置,并强制在服务器启动时装载 CLR。
如果使用 Visual Studio 进行编译,则 CustdbScripts.dll 的位置为 c:\mldotnet\CustdbScripts\CustdbScripts\bin\Debug。如果在命令提示符处进行编译,则 CustdbScripts.dll 的位置为 c:\mldotnet。
带 -sl dnet 选项启动 MobiLink 服务器。
如果使用 Visual Studio 编译程序集,请运行以下命令:
mlsrv12 -c "DSN=SQL Anywhere 12 CustDB" -dl -o c:\mldotnet\cons1.txt -v+ -sl dnet(-MLAutoLoadPath=c:\mldotnet\CustdbScripts\CustdbScripts\bin\Debug) |
如果在命令提示符中编译程序集,请运行以下命令:
mlsrv12 -c "DSN=SQL Anywhere 12 CustDB" -dl -o c:\mldotnet\cons1.txt -v+ -sl dnet(-MLAutoLoadPath=c:\mldotnet) |
将出现一条消息,指明服务器已准备好处理请求。如果同步过程中触发了 upload_insert 事件,则会执行 .NET 方法。
前进至第 6 课:测试同步。
![]() |
使用DocCommentXchange讨论此页。
|
版权 © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |