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 » UltraLite - .NET Programming » Tutorial: Building a Windows Mobile application using UltraLite.NET


Lesson 5: Building and deploying the application

In this lesson, you build your application and deploy it to a remote device or emulator.


This lesson assumes you have completed all preceding lessons. See Lesson 1: Creating a Visual Studio project.

  1. Build the solution.

    Ensure that your application builds without errors.

  2. Choose the deployment target.

    The deployment target must match the version of ulnet16.dll that you included in your application.

  3. Click Debug » Start.

    This builds an executable file containing your application and deploys it to the emulator. The process may take some time, especially if it must deploy the .NET Compact Framework before running the application.

  4. If errors are reported, you may want to check that your deployment was completed successfully using the following checklist:

    • Confirm that the application is deployed into \Program Files\appname, where appname is the name you gave your application in Lesson 1 (CSApp or VBApp).

    • Confirm that the path to the database file in your application code is correct.

    • Confirm that you chose Link File when adding the database file to the project and you set the Build Action to Content Only and Copy to Output Directory is set to Copy Always. If you did not set these options correctly, the files will not be deployed to the device.

    • Ensure that you added a reference to the correct version of ulnet16.dll for your target platform, or ran the Windows Mobile installer. For versions of Windows Mobile earlier than Windows Mobile 5.0, if you switch between the emulator and a real device, you must change the version of the library that you use.

    • You may want to exit the emulator without saving the emulator state. Redeploying the application copies all required files to the emulator, and ensures there are no version problems.

  5. Test your application:

    1. Insert data into the database.

      Enter a name in the text box and click Insert. The name should now appear in the listbox.

    2. Update data in the database.

      Click a name in the listbox. Enter a new name in the text box. Click Update. The new name should now appear in place of the old name in the listbox.

    3. Delete data from the database.

      Click a name in the list. Click Delete. The name no longer appears in the list.


The application is tested and can be deployed.