FOXPRO 2.6 COMMANDS

COMMON CAMMANDS USED FOR DATABASE


1) CREATE
This command is used to create the database using FoxPro.
Syntaxt –
create NCIT
When you give create command it immediate a dialog box to create a database fields (headings of the columns).
It has following options –
Name – to specify the name of the field
Type – to specify the type of the field like – Character/Numeric/Date/Float
Width – the length of the field data.
Dec -  if you want to use the number with decimal points.

It has two command buttons –
Insert – to insert a new field.
Delete – to delete the existing field.
After specifying the field names then press OK button
When you press the OK button
(It will show a message box "INPUT DATA RECORDS NOW?" If you want to insert the records according to the database fields)
Insert the records of the database.

2) LIST
This command is used to see the data of the database table created
Syntax-
List

3) GOTO
This command is used to navigate (to go to any record) in the database.
A DISPLAY command follows the GOTO command
Syntax
Goto <Label>

GOTO TOP
It is used to go to the first record of the database.
Syntax-
Goto top
display

GOTO BOTTOM
It is used to go to the last record of the database.
Syntax-
Goto bottom
display

GOTO <Record Number>
It is used to go to the 3rd record of the database.
Syntax-
Goto 3
display

Using NEXT with GOTO. The NEXT command with the GOTO command is used to see the next number of records of the database.
Syntax-
Goto 3
Display next 2

4) BLANK
This command will empty the record.
Syntax-
Goto 3
Blank

This will empty the 3rd  record.

Syntax-
Goto 3
Blank next 4
This will empty the next 4 records.

5) SKIP
This command will leave the record.
Syntax-
Goto 3
Skip 3
Display
This will show the seventh record of the file.

6)DELETE
This command is used to delete the records from the database. The deleted records will be shown with the * sign. The deleted records will be undeleted.
Syntax -
Goto 3
Delete
Or

Syntax-
Goto 3
Delete next 3

7) RECALL
This command is used to undelete the deleted records.
Syntax –
Goto 3
Recall
Or

Syntax-
Goto 3
Recall next 3

8) PACK
This command is used to delete permanently any record. This command is used after the delete command.
Syntax –
Goto 4
Delete
Pack

Or

Syntax  -
Goto 4
Delete next 3
Pack

9) ZAP
This command is used to delete the records permanently from the database.
Syntax –
Zap

10) EDIT
This command is used to edit the records of the database this command will only edit the records. We cannot insert new records with it.
Syntax-
Edit
Or
Syntax
Goto 4
Edit

11) APPEND
This command is used to insert new records in the database.
Syntax-
Append

12) MODI STRU
This command is used to change the fields or enter new fields for the records in the database.
Syntax -
Modi stru
This command will open the early option of the fields. This will open an dialog box as-
Insert – to insert the new field.
Delete – to delete the field.
You can also move the field from their positions.

13) BROWSE
This command shows the database in the tabular form you can also edit the records from the database.
Syntax-
Browse

BROWSE  NOEDIT
This command stop to edit the records. But we can delete the records by Ctrl+t.

BROWSE NODELETE
This command stop to delete the records.

DIRECT USE OF THE COMMANDS
Syntax –
Edit for name=”Aman”
Or
Edit for rollno=3
This will edit the specified record.
Syntax –
delete for name=”Aman”
Or
delete for rollno=3
This will delete the specified record.
Syntax –
recall for name=”Aman”
Or
recall for rollno=3
This will recall the specified record.