Generating Code for a Smart Device Application

PowerDesigner can generate code for smart device applications.

Before generating a smart device application, you must:
  • Ensure that you have attached the ADO.NET Compact Framework (and, if you want to generate unit tests, UnitTest.NET Compact Framework) extensions (see Generating Windows or Smart Device Applications).

  • Set any appropriate model properties on the ADO.NET CF and Application tabs, including a functioning connection string (see ADO.NET and ADO.NET CF Options).

  • Specify appropriate values for the following variables (select Tools > General Options, and click the Variables category):
    • CFUT_HOME – if using Microsoft Mobile Client Software Factory CFUnitTester

    • ASANET_HOME – if using Sybase ASA. Specifies the location of iAnywhere.Data.AsaClient.dll.

    • SQLSERVERMOBILENET_HOME – if using Microsoft SQL Server Mobile Edition. Specifies the location of System.Data.SqlServerCe.dll

    • ULTRALITENETCE_HOME – if using Sybase UltraLite. Specifies the location of ulnet10.dll

    • ULTRALITENET_HOME – if using Sybase UltraLite. Specifies the location of iAnywhere.Data.UltraLite.dll and en\iAnywhere.Data.UltraLite.resources.dll

  1. Select Tools > Check Model to verify that there are no errors in the model. If there are errors, fix them before continuing with code generation.
  2. Select Language > Generate C#2 Code or Generate Visual Basic 2005 to open the Generation dialog box.
  3. Specify the root directory where you want to generate the code and then click the Options tab.
  4. Specify any appropriate options and then click OK to generate code immediately or Apply and then Cancel to save your changes for later.