Creating the TravelRequest Database Table

Goal: Create the database table that will be used to create a Travel Request mobile business object.

Prerequisites
Complete Creating the sampledb Connection Profile.
Task
This task shows you how to create a SQL file that you can use to create a new database table, which is then used to create a mobile business object.
  1. From the main menu, select File > New > Other.
  2. Select SQL Development > SQL File, and click Next.
  3. Enter or select the values shown and click Finish:
    Field Value
    Parent folder Select the MobileWorkflow101 project.
    File name Enter TravelRequest.
    Database server type Select Sybase_ASA_11.x.
    Connection profile name Select sampledb.
    Database name Select sampledb.

    new_sql_file
  4. In the TravelRequest.sql editor, copy and paste this code:
    CREATE TABLE TravelRequest (
        trvl_Id                      integer NOT NULL DEFAULT autoincrement 
       ,trvl_Date                    date NULL 
       ,trvl_Loc                     varchar(20) NULL
       ,est_Cost                     float NULL
       ,purpose                      varchar(200) NULL
       ,trvl_Status                  varchar(20) NULL 
       ,st_Cmmnt                     varchar(200) NULL 
       ,PRIMARY KEY CLUSTERED (trvl_Id) 
    );
    
    
  5. Select File > Save.
  6. Close the TravelRequest.sql file.
  7. In the MobileWorkflow101 project, right-click the TravelRequest.sql file you created and select Execute SQL Files.
    This creates a database table called TravelRequest.
  8. Expand the sampledb database you created, then expand the Tables folder.
    You should see the new TravelRequest table. If you do not see it, right-click the Tables folder and select Refresh.
Related tasks
Creating the TravelRequest Mobile Business Object
Deploying the WorkFlow101 Mobile Application Project