Creating a Database Table


Launching Paradox

To create a table, you will use an external database application. Borland C++ Builder ships with Paradox 7, which we will also use for this application.

There are various ways you can launch Paradox. If C++ Builder is already running, on the main menu, you can click Tools -> Database Desktop. To open Paradox as an independent application, you can use either the one that ships with C++ Builder or use one that is installed from Corel Paradox or WordPerfect. To launch the Paradox that ships with Borland C++ Builder, click Start -> Programs -> Borland C++ Builder -> Database Desktop. If you are using the version that ships with Corel WordPerfect, click Start -> Programs -> WordPerfect Office 2002 -> Paradox 10


On the Welcome dialog box of Paradox 10, click New Database. On the second Welcome dialog box, type the name of the database as DBExercise and click the Browse button. On the Browse For Folder dialog box, select the C:\Program Files\Common Files\Borland Shared\Data

Click OK. Click Finish.

  • To start Paradox, click Start -> Programs -> Borland C++ Builder ->Database Desktop.

Starting a Table

  1. On the main menu of Database Desktop, click File -> New -> Table...
  2. On the Create Table dialog box, make sure Paradox 7 is selected or select it:
  3. Click OK.
  4. For the first field, type TimeSheetID
  5. Right-click the empty field under Type and select + (Autoincrement)
  6. Press Enter.
  7. Double-click the empty field under Key to make TimeSheetID the primary key (you could also press the Space bar when the field under Key receives focus).
  8. Press Enter.
  9. In the empty field under TimeSheetID, type MondayIn1 and press Enter.
  10. Right-click the empty field under Type and select Alpha.
  11. Press Tab.
  12. For the field under Size, type 8
  13. Click the field under Default Value and type 09:00 AM
  14. Complete the table with the following fields:
    Field Name Type Size Default Value
    TimeSheetID +    
    MondayIn1 A 8 00:00 AM
    MondayOut1 A 8 00:00 AM
    MondayIn2 A 8 00:00 AM
    MondayOut2 A 8 00:00 AM
    TuesdayIn1 A 8 00:00 AM
    TuesdayOut1 A 8 00:00 AM
    TuesdayIn2 A 8 00:00 AM
    TuesdayOut2 A 8 00:00 AM
    WednesdayIn1 A 8 00:00 AM
    WednesdayOut1 A 8 00:00 AM
    WednesdayIn2 A 8 00:00 AM
    WednesdayOut2 A 8 00:00 AM
    ThursdayIn1 A 8 00:00 AM
    ThursdayOut1 A 8 00:00 AM
    ThursdayIn2 A 8 00:00 AM
    ThursdayOut2 A 8 00:00 AM
    FridayIn1 A 8 00:00 AM
    FridayOut1 A 8 00:00 AM
    FridayIn2 A 8 00:00 AM
    FridayOut2 A 8 00:00 AM
    SaturdayIn1 A 8 00:00 AM
    SaturdayOut1 A 8 00:00 AM
    SaturdayIn2 A 8 00:00 AM
    SaturdayOut2 A 8 00:00 AM
    SundayIn1 A 8 00:00 AM
    SundayOut1 A 8 00:00 AM
    SundayIn2 A 8 00:00 AM
    SundayOut2 A 8 00:00 AM
    Notes Memo 240  
  15. Click Save As...
  16. Type tblTimeSheet
  17. Note the folder where you are saving your table.



Copyright © 2003-2007 FunctionX, Inc.