Lesson 7: Creating an Employee List  Lesson 7: Creating an Employee List


Create a workspace and target

Note

  1. Click the New button in the PowerBar or select File>New from the menu bar.

    New button

    The New dialog box displays.

  2. In the Workspace tab, select Workspace and click OK.

    Shown is the Quick Select screen. At top left is a Tables list box with the customer table highlighted. At right is a Columns list box showing all the columns of the customer table, such as i d, f name, and l name. At the bottom is a scrollable blank display area with rows labeled Column, Sort, Criteria, and Or.
  3. Navigate to the \PocketBuilder 2.0\Tutorial\EmployeeList directory.

  4. Type emplist_tutorial in the File name text box.

  5. Save the new workspace as emplist_tutorial in the \PocketBuilder 2.0 \Tutorial\EmployeeList directory.

  6. Select File>New from the menu bar and click the Target tab

    or

    Right-click emplist_tutorial in the System Tree, select New from the pop-up menu, and click the Target tab.

    The Target page of the New dialog box displays.

  7. Select the PocketPC Application Creation Wizard icon and click OK.

    Shown is the Target page of the New dialog box. It has icons for Application, Template Application, Existing Application, E A Server Component, COM / com plus component, Automation Server, Web Site, J S P Target, and Source Controlled Web Target.

    The PocketPC Template Application wizard displays. In most wizards, the first page explains what the wizard is used for. As you step through the wizard, you can press F1 to get Help on most fields.

  8. Click Next until the Specify New Application and Library page displays.

  9. Type emplist_tutorial in the Application Name text box.

    When you click Next or place the cursor in the Library or Target text box, the wizard automatically assigns file names to the library and target that use this application name. It assigns the library a PKL extension and the target a PKT extension.

    Shown is the Target page of the New dialog box. It has icons for Application, Template Application, Existing Application, E A Server Component, COM / com plus component, Automation Server, Web Site, J S P Target, and Source Controlled Web Target.
  10. Click Next until the Specify Connectivity page displays.

    You accept the default library search path and window and menu names. This lesson requires database connectivity.

  11. Select the Requires SQL Database connection check box.

    Shown is the Target page of the New dialog box. It has icons for Application, Template Application, Existing Application, E A Server Component, COM / com plus component, Automation Server, Web Site, J S P Target, and Source Controlled Web Target.
  12. Click Next.

    Select the ASA Demo database profile from the Profile Name list if it is not already selected.

    Shown is the Target page of the New dialog box. It has icons for Application, Template Application, Existing Application, E A Server Component, COM / com plus component, Automation Server, Web Site, J S P Target, and Source Controlled Web Target.
  13. Click Next.

    Select the Script radio button to specify that the application get its connection information from script.

    Shown is the Target page of the New dialog box. It has icons for Application, Template Application, Existing Application, E A Server Component, COM / com plus component, Automation Server, Web Site, J S P Target, and Source Controlled Web Target.
  14. Click Next.

    The Specify Project Object page displays.

    Shown is the Target page of the New dialog box. It has icons for Application, Template Application, Existing Application, E A Server Component, COM / com plus component, Automation Server, Web Site, J S P Target, and Source Controlled Web Target.

    The wizard will create a project object that you can open in the Project painter. The Project painter allows you to streamline the generation of the files your target needs, create an executable for desktop deployment, and rebuild your application easily when you make changes to the application.

  15. Click Next until the Specify Deployment Configuration page displays.

    You accept the default names for the project name and the executable file name and you do not choose to build dynamic libraries.

  16. Accept the default names in the Specify Deployment Configuration wizard page.

    The Target directory (with a default of Program Files) is the directory on the device or emulator where you want to deploy your application. The Build directory is the directory where you want to build your application. The default “.” is the directory that contains the main PocketBuilder application library.

    Shown is the Target page of the New dialog box. It has icons for Application, Template Application, Existing Application, E A Server Component, COM / com plus component, Automation Server, Web Site, J S P Target, and Source Controlled Web Target.
  17. Click Next.

  18. Accept the default version information.

  19. Click Next to display the Ready To Create Application page.

    This is the last wizard page. It lists your current selections so that you can review them and use the Back button to go back and change them if necessary.

    Shown is the Target page of the New dialog box. It has icons for Application, Template Application, Existing Application, E A Server Component, COM / com plus component, Automation Server, Web Site, J S P Target, and Source Controlled Web Target.
  20. Click Finish.

    The PocketPC Application Creation Wizard creates the emplist_tutorial.pkt target and the emplist_tutorial.pkl library, and sets the new emplist_tutorial application as the default application.

    You can expand the System Tree to view all the objects that have been created by the PocketPC Application Creation Wizard. The System Tree does not display the file extension of the emplist_tutorial target, but it does display the directory where the target file is saved.

    The emplist_tutorial.pkl library displays under the basic_tutorial target in the System Tree. It contains the target Application object, which has the same name as the target object but displays under the library file.

    Shown is the System Tree. The p b tutor dot pibble library displays under the p b tutor target iand it contains the target Application object, which has the same name as the target object but displays under the library file. Other objects generated by the wizard also display under the library file.

    Other objects generated by the wizard also display under the library file. One of these is the main window w_emplist_tutorial_main.

    Next you create a DataWindow object for your application.





Copyright © 2004. Sybase Inc. All rights reserved. Lesson 7: Creating an Employee List

View this book as PDF