Database Creation in FoxPro

Database Creation:-

Each field stored in a table is given a field name and a data type. The data type or a field determines what type of data can be stored in it and the amount of storage space available for the data.

Creation rules have to be followed while entering the field names which are as follows:

  1. Can have a maximum of 10 characters.
  2. Can comprise alphabet both uppercase and lowercase(A-Z and a-z), digits 0 to 9 and underscore(_)
  3. Must start with an alphabet.

Go to Start >> Programs >> FoxPro for Windows
It then displays the FoxPro window with command window. We have to type commands in the command window. Typing the command ‘Clear’ and pressing enter clears the screen.

Create a Table:-

  1. Type the command ‘Create Student’ and press enter which displays the table structure dialogue box.
  2. If prompts to input data records now, click Yes and after inputting the data click OK.
  3. This displays the input record table ‘Student’. Press Tab to move the active cell.
  4. To save a record type ‘Ctrl + W’. Again for displaying list in table, type list in the command box and hit enter.
  5. To close the existing table, use the command Close all and to open the table again, type the command – use and hit enter. Here to display our student table we have to type use student and then hit enter.
  6. Dir command is used to display the database table Student consisting of Database files (DBF).
  7. To come out of FoxPro use the command ‘Quit’

Leave a Reply

Your email address will not be published. Required fields are marked *