Lesson 1: Import a DataWindow library

You can import DataWindow libraries into Sybase WorkSpace and then reuse any DataWindow object in a Web page.

StepsImporting a DataWindow library

By default, DataWindow libraries extensions display during the import process.

  1. To verify that the DataWindow library extensions are selected to display in the WorkSpace Navigator, click the Menu icon (down arrow) and select Navigator Extensions|DataWindow Library Extension.

    The check mark to the left of the menu item indicates it is already selected. Do not deselect the menu item by clicking on it.

  2. In the Workspace Navigator, right-click Tutorial and select Import from the context menu to import an existing DataWindow library into your project.

    The Import wizard displays.

  3. Select DataWindow Library (.pbl) and click Next.

  4. In the From directory field, click Browse and select this path: <installation directory>\sybase_workspace \web_development\eclipse\plugins \com.sybase.stf.jmt.template_1.5.0\tutorial \webroot\WEB-INF\pb

  5. Click the test.pbl check box in the right pane.

  6. Verify that the Into folder field reads:

    Tutorial\webroot\WEB-INF\pb

  7. Accept the remaining default settings, and click Finish.

  8. Verify that you successfully imported the test.pbl file by expanding its contents in the WorkSpace Navigator.

StepsImporting the connection profile and viewing an imported DataWindow

A connection profile enables connection to servers, message transports, and databases. Before you can open and view a DataWindow, you must connect to the database so you have access to the DataWindow object data sources.

  1. Double-click the startdemo.bat file to start the Adaptive Server Anywhere server and the sample database.

    <installation directory>\DevRuntimes\ASA\startdemo.bat

    Adaptive Server Anywhere successfully starts when you see its icon in the Windows taskbar.

  2. In the WorkSpace Navigator, right-click the d_emp DataWindow library and select Open from the context menu to create a connection profile for the tutorial database that contains the datasources for this DataWindow object.

  3. In the Database Connection Profile dialog box, click New Connection Profile.

  4. In the New Connection Profile wizard, select Sybase ASA and click Next.

  5. In the Name field, enter webapp_db and click Next.

  6. In the Specify a Driver and Connection Details page, click Test connection to verify that you can successfully connect to the server.

    Do not proceed until the ping succeeds. If the ping does not succeed, see your system administrator for assistance.

    In the Success dialog box, click OK to continue.

  7. Click Finish to create the connection profile.

  8. In the Database Connection Profile dialog box, click webapp_db and then Connect.

  9. Click OK to connect to the asaDemo database.

    The d_emp DataWindow opens in the editor.