DX Jumpstart

How to build a data-aware application in four easy steps.

Building a DX application consists largely of dragging widgets from the Schema Browser or Palette to create a hierarchy of widgets, then setting their resources. When you create an application by dragging fields from the Schema Browser to the Browser, most of the work is done for you. Here's how:

Note: This example uses Sybase. Oracle and Informix users may see slightly different screens.

Step 1: Select the data you want to work with.

  1. From the Schema Browser, choose a database from the Database list. If you want to follow along, choose the OrderEntry Database.
    (Oracle users: choose an owner name from the Owner list.)
  2. All corresponding database tables for the OrderEntry database are now displayed in the Tables list. Select the table you want to work with, in this case we use Accounts.
  3. Now choose a widget class type from the Object Type menu, in this case since choose DataField.
  4. Finally, select the desired fields from the Columns table. In the example below, you see four fields selected.

Selecting columns from the Schema Browser


Step 2: Drag and drop fields from the Schema Browser to the Browser.

  1. Use mouse button two to drag the fields to the Browser.
  2. A complete interface is created by Database Xcessory!
  3. Note that DX creates a Form widget as the interface's container, and adds a Control Panel at the bottom of the screen. DX also creates a labeled data field for every field you dragged and dropped.

A Simple Application


Step 3: Test your application in Play Mode.

  • From the Browser Project menu, select Play Mode.

Note that Play Mode is "data safe" -- that is, all data updates and additions are rolled back immediately upon exiting Play Mode.

Selecting Play Mode from the Browser

  • Notice that some of the Query Control widgets in the Control Panel are now active.
  • Press the "Search" button to retrieve the first record in the database.
  • You can now use the arrow keys, "Search" button and built-in QBE features to access other records.
  • To add records to the database, select the "Last" button, then the "Next" button. You should see a blank screen where you can enter a new record.


Step 4: Compile and Run Your Application

To generate code for your application:


 
  • Return to Build Mode by selecting Build Mode from the Browser Project menu.
  • Select Generate Code... Generate C from the Browser File menu.
  • To compile your application, enter:
    % make -f makefile-c
  • To run your application, enter:
    % main-c

Congratulations!
You've just created your first DX application!

Documentation: