Generating C# Object API Code

Generate Object API code for Windows Mobile devices.

Prerequisites
  1. Connect to both the sampledb database and Unwired Server. Code generation fails if the server-side (run-time) enterprise information system (EIS) data sources referenced by the MBOs in the project are not running and available to connect to when you generate object API code.
  2. Switch to the Advanced developer profile to see advanced options in Sybase Unwired WorkSpace.
Task
  1. Start Sybase Unwired WorkSpace, using the same workspace location you used when you created the SUP101 project in the MBO tutorial.
  2. In Sybase Unwired WorkSpace, open the SUP101 mobile application project.
    In WorkSpace Navigator, right-click the SUP101 folder and select Open in Diagram Editor.
  3. In WorkSpace Navigator, expand SUP101. Under Generated Code, add a folder named WindowsMobile.
  4. Right-click anywhere in the SUP101 - Mobile Application Diagram and select Generate Code.
  5. On the Code generation configuration screen, click Next.
  6. Make sure the Customer and Sales_order MBOs are selected, then click Next.
  7. Enter the information for these configuration options:
    Option Description
    Language Select C#.
    Platform Select .NET Compact Framework 3.5 for Windows Mobile.
    Unwired Server Select My Unwired Server.
    Server domain Select default.
    Page size Select <blank> (replacing 1024).
    Namespace Enter SUP101WindowsMobile.
    Destination Enter \SUP101\Generated Code\WindowsMobile.
    Generate metadata classes Select for this tutorial.

    Generate Code wizard, Configure Options page
  8. Click Finish.
    If you see a success notification dialog might appear, click OK.
    In the Generated Code directory, you see WindowsMobile\src\SUP101WindowsMobile.