Lesson 3: Run the MobiLink server with -sl dnet

Running the MobiLink server with the -sl dnet option specifies the location of .NET assemblies and forces the CLR to load on server startup.

If you compiled using Visual Studio, the location of CustdbScripts.dll is c:\mldnet\CustdbScripts\CustdbScripts\bin\Debug. If you compiled at a command prompt, the location of CustdbScripts.dll is c:\mldnet.

 To start the MobiLink server (mlsrv12) and load .NET assemblies
  • Start the MobiLink server with the -sl dnet option.

    Run the following command if you used Visual Studio to compile your assembly:

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

    Run the following command if you compiled your assembly at a command prompt:

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

    A message indicating that the server is ready to handle requests appears. The .NET method is now executed when the upload_insert event triggers during synchronization.

 Further reading