Recovery Batch 9
Recovery Batch 9
1. Numeric Fields:- These types of fields are used to store numeric data. These
fields can contain numbers, decimal point like 10,-122.25 etc. Numeric fields
can be used in arithmetic operations like addition, subtraction etc.
2 Alpha-numeric Fields or Character Fields:- These types of fields are used
to store character data like names of people, codes, descriptions of items, etc.
Character fields cannot be used in arithmetic operations like subtraction,
multiplication etc.
3 Date Fields:- These fields hold only date values i.e. the day/year. Just like
character fields they cannot be used arithmetic operations like multiply and
divide etc. however two date fields can be subtracted to give you the number
of days between the two dates.
Memo Fields:- Memo fields are just like character fields, but they can hold
information like scanned images, digitized sound etc. Note that memo fields
can contain large amounts of text data. The data in a memo field is not stored
in the database file but instead another file having the same name as the
database file but with the extension FPT get created. The data will be stored
in this file.
5 Logical Fields- These fields are used to hold the value .T. for TRUE or .F.
for FALSE or Y for Yes or N for NO. No other data case is stored in a logical
field.
6 Float Fields:- Like the Numeric data type, a Float also contains numeric data
which consists of numbers and a decimal point along with a sign. However the
difference between a numeric data type and a float data type is that the float
data type is used for scientific calculations because it stores more significant
digits internally, i.e. it is more precise.
7. General Field: The General data type is used to store OLE (Object Linkingg
and Embedding) objects that let you embed object created in one application
within applications written in FoxPro. For example, we can use a General
Field include spreadsheets created in one Window's application within your
FoxPro application.
Field widths are subject to maximum limit depending on the data type of the field.
These are listed below.
Memo Fields Will always take 10 characters in the DBF file, but
the size of the memo field is only limited by the
amount of space in the disk.
Float Fields 20 Digits
COMMANDS OF FOXPRO
3. CREATE: This command is used to create a table.
USE
& LIST: This command is used to display all records or specified records of an
opened table.
Syntax: LIST
LIST FOR <exp> :- This command is used to display all records which satisfy
the expression.
Ex: LIST FOR ROLL > 10
LIST <field name1, field name2,. This command is used to display the
records with specified fields.
7. DISPLAY: This command works like list command. It also displays the
information of records.
) DISPLAY: Used for displays the information current record.
i) DISPLAY ALL Used displays ll the records like list command, butthe
difference is that it displays information page wise.
(ii) DISPLAY ALL FOR <exp>:- Used for displays the information of all
records for specified expression.
Syntax: DISPLAY ALL FOR <exp>
x DISPLAY ALL FOR ro11 >= 10
DISPLAY STRUCTURE Used for displays the structure of table.
( DISPLAY FIELDS< fieldname1, field name2,...> This command is
used to display the records with specified fields.
Syntax: BROWSE FIELDS < field name1, field name2.. FOR <exp>
Ex: BROWSE FIELDS ro11, name, address FOR ro11< 10
(vi) BRowSE FREEZE: This command allows to modify the specified field
only.
Syntax: BROWSE FREEZE <field name»
Ex: BROWSE FREEZE ROLL
9 APPEND: used to append (add) new records in current table.
() APPEND BLANK: Usedfor appends one blank record in current opened
table.
i) APPEND FROM: This command appends records into current opened
table from another table.
Syntax: APPEND FROM < table name>
Ex: APPEND FROM student
(i) APPEND FROM stable name» FOR <exp> : This command appends
records into current opened table from another table according to certain
condition.
Syntax APPEND FROM <table name> FOR <exp>
Ex: APPEND FROM student FOR roll >=10
10.EDIT This command is also used for modifying records like browse
command but difference is that through browse command fields are arranged
in columns but through edit, fields are arranged in rows.
11.GOTO & SKIP These commands are used for Moving the record
pointernter from one record to another.
GOTOn: This command moves the record pointer to nh record number.
Ex: GOTO 15
GOTO TOP: This sends the record pointer to first record.
Syntax: GOTO TOP
GOTO BOTTOM: This sends the record pointer to last record.
Syntax GOTO BOTTOM
SKIP: This command moves the record pointer, one record ahead.
Syntax: SKIP
SKIP n: This command moves the record pointer, n records ahead.
Syntax: SKIP n
Ex: SKIP 2
(VI) SKIP -n: This command moves the record pointer, n records back.
Syntax: SKIP -n
Ex: DKIP 10
12 INSERTThis command is used to insert records anywhere in current
table.
() INSERT: This command inserts records after current record in current
opened table.
Syntax: INSERT
(i) INSERT BEFORE: This command inserts records before current record in
Current opened table.
Syntax: INSERT BEFORRE
(ii) INSERT BLANK: This command inserts a blank record after the current
record in current table.
Syntax: INsERT BLANK
4. DELETE This command marks records with (") for deletion so that
further these records could be permanently deleted.
() DELETE: This command marks the current record of current table for
deletion.
Syntax: DELETE
(n) DELETE RECORDn: This command marks n record for deletion of current
table.
Syntax: DELETE RECORD n
Ex: DELETE RECORD 10
(i) DELETE NEXT n: This command marks next n records of current table for
deletion.
Syntax: DELETE NEXTn
Ex: DELETE NEXT 5
iv) DELETE REST: This command marks all records from current record to
the end of the current table for deletion.
Syntax: DELETE REST
(V) DELETE ALL: This command marks all records of current table for deletion.
(V) DELETE FOR <exp>: This command marks those records for deletion of
current table whose expression is true.
15. RECALL: This command removes deletion mark for records of current
table.
RECALL: This command removes deletion mark for current record of
current table.
Syntax: RECALL
) RECALL RECORD n: This command removes deletion marks of n record
of current table.
Syntax: RECALL RECORD n
Ex: RECALL RECORD 10
(ii) RECALL NEXTn: This command removes deletion mark for next n
records of current table.
Syntax: RECALL NEXT n
Ex: RECALL NEXT 5
iv) RECALLL REST: This command removes deletion mark of all records from
current record to the end of current table.
Syntax: RECALL REST
(v) RECALL ALL: This command removes deletion mark of all records of
current table.
Syntax: RECALL ALL
(vi) RECALL FOR cexp>: This command remove deletion mark of those
records of current table whose expression is true.
Syntax: RECALL FOR cexp>
Ex: RECALL FOR marks> 500
16. PACK:-This command deletes permanently those records, which were
marked for deletion.
Syntax: PACK
17. ZAP This command deletes all records of currenttable.
Syntax: ZAP
m o d i b y 6auchuxe
DEL
Commonds'
.Defme the followmg
APPenc
Bxouwse
Displa
Replace
ZAP