You are on page 1of 53


Computer by using a (DBMS) data base management system software than in Computer
Terminology. This file is called data base.

In another words we may say that the organized Collection of related

information is called data base.


Before we start visual fox-pro it must be installed

on the hard disk. If visual Fox-pro is already installed then following steps must be done
to start the visual fox-pro
click on start button then start menu appear
Click on programme submenu choose MS Visual studio and then chose MS-Visual fox-
pro 6.0.

The main screen open with the active Command window.


Visual fox-pro menu system has main


(1)Menu bar
(2)Menu Pad
(3)Popup menu
(4)Menu option

Command Window:
The Window at the Command window which is
used to enter the fox-pro Command to perform Several operation in Visual foxpro, the
Command Window is automatically opened.

(Note:- That Command Window is used only for entering the commander where as the
another part of the Screen is used for displaying the result. Results are not display in the
Command window that window is called programme window.

1. CREATE Command
This is Used to Create a data base file.
Syntax :- Create DBF File name

After the using this Command the data base structure window
appear In this window we specify the number of fields and their name and their size
And their type.
The name of field may be up to character long. It doesn’t allow any mark
(1~) underscore (-) Can be use for this purpose. In structure of data base we can input the
record into the date base file.


The name specify the name of the field, field name may be consist of
letter, number and underscore character but the name of field must be started with an
alphabet, field can be up to 10 character long.

(Note :- Space and other marks are not allow in a field name)

Type specify the data type that the field can store. A field type can be 1
to 13 types.
Type of data base are-

Character is the most Common data type in table. Character
field store 1 to 254 alphabet, numeric character such as leter, number symbol, space,
character is the kdefault field type and it is not used for calculation.

Numeric field is used to store numbers with or without decimal
place, number can be upto 20 digits In length.

Float type of field can have a width upto 20 digits, including
On optional +,- and (decimal). This field is used for scientific and static Calculation float
type of field is used in business Calculation.

The integer type is use for non decimal numeric value. In the table the integer field type
is stored or a 4 byte binary value so it require less memory than other numeric data type.

Date field is stored in America Format (MM/DD/YY). The Visual
foxpro automatically show the standard width for the 8 character including the slash (1).

Date/time fields contain Combination of the data and time. The
value is stored in the format of YY/MM/dd/hh/mm/ss.

Double type of field allow you to store data that require a higher degree of
precision. This is most use in scientific and engineering application.
(Note :- The double data type holds numeric data but it does calculate with
For more accuracy then the numeric data type.

Logical field is a single char or false which represiting a true
representing ‘True’ or ‘F’ and ‘n’ Represent ‘False’.

Memo field is also type of black of text unlink a character field.
Visual foxpro, create a specify ‘FPT’ file ‘FPT’ text memo field are limited only
By the available space on hard disk. We cannot compare this field to another

This field is used to store money value. Its contents are accurate of
four decimal place.

The most Common use of which store OLE (object linking and
embbeding) whose size is limited only by available memory. In this type we can Insert

111. WIDTH

We can use the width of column to define the maximum number

of character or digit that can be stored in field.


Character → Any text → 1 to 254 bytes

Currency → Curr. Amount → s bytes

Memory 1 to 20 by

in table.
Float → INT./float →

Double → a double floating point number → 8 byte

Integar → int value → 4 byte

Logical value → value of true of false → 1 bytes

Memo → ref. Of an. Ole → 4 bytes.

Decimal column specify the number of digits to the rights of the
decimal point. The decimal column apply to numeric and double data type

A table Contains records in the order that they are add to the record
order instead of changing the physical record order instead of changing the physical order
instead of changing the physical order visual fox-pro used a recnd file
Called on index file that is present the records to us in a different the records to us in a
different order. Index specify a regular index on the field in any order.

6. Null
Null column, when check is used to define a field that Can accept null
Value. (10).

We can modify the structure throught the menu by selecting
the table designer form. The view menu or from the window menu
Selected the data session. The dialogue box is display and click on properties
Box is display and click on propertier buton. It again display a working area dialogue
box now choose modify button with modify structure. We the structure
Through the menu by selecting the table designer form. The view menu or form
the view window menu selected the data session. The dialogue for is display and
click on properties button. It again display a working area dialogue box now choose
modify button with modify structure we can add or remove field and change widh or data
In other way we can also modify structure by the command
window for this purpose we can use modify structure command before using this
Command it is to the noted that the data base file is must be open.
Syntex → :- Modify structure

Which we want modify the structure of data base or table. Modi Stru command creates a
back up file.


Opening with menu:

Once we can create a file and we can open it again or any time
by the following steps:

Click on file menu and choose open to access the open dialogue box.
Select type of file and select the table for displaying.
(note :- The table file have the extension .dbf).
The desire table is found click it and select the file name and click ‘or’ button
to open the selected table. The status for display the name of the table that you
have open.
By using Command window
The use command can be used for this purpose with
following format :
Syn :- USE info ←
A status for is that which display the file name which open
Currently and record status that is total number of record of the current file.

Closing data base/table

In visual fox-pro when a new data base file use than the
arrange file automatically close visual fox-pro also provide the command close data
Base”, which is currently open

Syn :- close data base ←

(Note:- if we use ‘USE’ command without file name it will close the open file).


After designing the stru of table or data
Base the next job is to insert the record in the data base file. Visual foxpro provide
The append command for this purpose. When we use this command a blank record will
be inserted in the data base file or table

Syn :- APPEND ←
Append command automatically insert a blanbk record at the end of
the file after inwrting all the records and press the ‘ctrl+w’ to exit and save it.


Visual foxpro provides two
Commands that can be for displaying the contains of the data base file.
(1) list (11) Display

This command display the all records of the data base file along with their
record numbers.

Syn :- List ←
There are several options we can use widh the list command

Removing record numbers from the list

We can use list command it display record
number along the record by default. If we want to remove the
Record number than use off close clause with list command.
Syn :- List off ←

Display list of selected fields

Visual foxpro provides facility that we can display the
record of the data base file. Selected for doing that Visual Foxpro
Provide a fields option with fields list.
Syn:- List to printer ←

Display list on printer

To display the result on the printer we can use to

Printer option with the list command.
Syn :- list to printer ←

When we use this command foxpro also display the result on the screen by default.
If we want that it doesn’t display the result on the screen during
Printing than for this purpose we can use a option “No-CONSOLE” with list
Syn:- List to printer No CONSOLE ←


The display command is used to display the current record of the data
base file. The display command is different from list command because list command
Display all records of the file and display command displayed only current record.
Syn :- Display ← (When we have a leye amount of records in D.B.F than
display show them page-wise)

Scope specify the criteria about the number of records scope mainly refers to
the number of records that visual fox-pro search for performing a command, there are 4
type of scope. :

This work on all the records of dbf.

Syn :- Display all ←
This works on the number of records are specified with next scope.
Syn :- Display next <Record No.>
(Note :- For using the scope it display or cant records from current D.B.F)
This work on the record whose number specify
Syn :- Display Record <REC: No> ←


This work on the record being with the current record and counting
Until the last record in the file.
Syn :- Display Rest <Rec No.> ←


After you may have editing data in
the records of a DBF you may dead to “edit” or “change” command.

There works are similar and use for editing the records in DBF.
There command can be applied on all the fields or specified fields of the DBF. If
We want to apply the command with the specify field than we can use field option
With field list.
Syn :- edit fields <field list> ←


Browse is different from editing or change
command . It display the several records in the form of horizontal table. Each record in
one row of the table. We can move the curser to any field. of any record and carry out
editing : The Browse Command more effective than editing and change command. We
can add new records delete extra records in data base by using the Browse command.
The ‘Browse’ command show record in a tabular, format displaying one record in one
Syn:- Browse ←
When the browse window appear on the screen a new meny browser will add
to menu bar. In this menu a option append record which is used to insert a new blank
record into the Browse window and another option toggle delete or ctrl+T is used to
delete the record logically in Browse Windows.
There are several options that can be use with ‘Browse Command

Displaying specific fields in the Browse Window to display the specific field in the
Browse windows we can use the fields option with the field list. By using this option we
can also arrange the order of the fields in the ‘Browse window’.
Syn :- Browse fields <field list>

(ii) Browse no append

When we use the Browse command with no-append’ option
it doesn’t allow to add new record in the Browse window.
Syn :- Browse No append ←

(iii) Browse no delete

When the Browse command is use with ‘nodelete’ option than it

doesn’t allow to delete any record logically in the ‘Browse Window’. We can only read
the record in the ‘Browse window’.
Syn :- Browse no modify/noedit ←

(iv) Browse nomodify or noedit

When we use the ‘Browse’ command with ‘no
modify’ or ‘no edit’ option than you can’t change the contents of records in ‘Browse
window’. We can only read the record in the ‘Browse window’.
Syn:- Browse nomodify/noedit ←
Browse title
Generally the title bar of the Browse window display the name of the
‘DBF’ which is open currently. If you want to change the name of title bar in the
‘Browse’ window than you can use the title option in the Browse command.
Syn :- Browse title <title name>
Browse title info ←

(vi) Browse width

The width option limit the number of character display for all fields
in the ‘Browse window’.
In another words we may say that the width option is use to specify
the width option is use to specify the width of column in the Browse window.
Syn :- Browse width <width range> ←
To specify the different width for each column or dields in Browse
window we can use the Browse command with following way :-
Syn :- Browse fields <field name >/10

(vii) Browse freeze

By this option we can ‘freeze’ the record printer for a specify field in the
Browse window.
Syn :- Browse freeze <field name> ←

(viii) Browse nomenu

When we use nomenu option with the ‘Browse Command’ than
‘Browse’ menu will not display in menu bar. When the Browse window will appear.
Syn :- Browse nomenu ←

We can divide re size and move the ‘Browse’ window to

divide the Browse window in two parts a small area in lower left corner of the window is
use. On this area a mouse pointer become two head arrow with a vertical line in its
centre and dragging the right for divide the window in two parts. This option allows you
to took at two parts of DBP at a one time.

Deleting Records in Data Base File

Visual foxpro provides the facility to delete the
records in the table or dbf. It is also provide facility in which you can delete the record
logically and permanently or physically for doing that: it provide “delete” the record.
Logically that appears detestation mark before the records. This command willn’t
physically remove the records in dbf.
Syn :- Delete (scope) for <condition> ←

This command is used to re call or re cover the records that are Logically
delete in the dbf. That is the record which are deleted by the ‘delete’ command. They
can be recover again for future use in dbf.
Syn :- Recall (scope) for <condition> ←

This command is used to remove all records that are logically delete that is
used to remove the logically deleted records physically in the dbf . It is to be noted that
no condition are use with the pack command.
Syn :- PACK ←

It removes all records from the current dbf. This is equal to delete pack
command or delete all. Zap command is much faster than delete and pack command.
Syn :- ZAP ←
( Notes) Once the records zap can’t be recover only data base structure remaining).

For Clause
This is used to specify a condition. It is used to retrieve the record a critarea
is specified with this clause on which the given command will be apply. The ‘For’ clause
can be use with with several types of command like display. List, locate, replace, delete
Syn :- Command (scope) for <condition> ←

An operator in Visual fox-pro specifies an operation to be perform on
operands to give a value. An uprand is depend on an operator acts. Operators that works
on two operands are called.

Binary operators:
Such as ‘+-*/ etc.
The operator that work on one value are called “Unary Operators”.
Arithmetics Operators
These operators are used to perform Arithmatic operators.
Artihmatic operators are used to do “Add; sub” etc in numerical type of data. These are:

Operation Symbol
Add +
Sub -

Multiple *
Div. /
Modules %
Exponensions or **

Relational operators

Relational Operators determine the relation among different

operands in the words relational operators are used to test the relation between two
expression or values. It may be used to compare characters or strings. It may also be
used for comparing numerical variables.
Operator Functions
> Creater than
< Less than
<> Not equal
<= Less than or equal
>= Creater than or equal
# N0 equal

(Note) “$” and “= =” operator are available only for character type.

Logical operators
It used when m than one condition has to be specify at the same
command line. There are three types of Logical computers.

It is called logical operators. This operators apply that every condition is
joined by an ‘and’ operators its true than the side action take place so we say.

Condition 1 + condition (ii) = Result

T + T = T

T + F = F

F + T = F

F + F = F


It is called logical ‘or’ operator it’s applied that if anyone of the

condition joined by an ‘or’operators than side action take place so in that case.

Condition (i) + Condition (ii) = Result

T + F = T

F + T = T

T + T = T

F + F = F

(C) Not
It is called logical ‘not’ operators. The ‘Not’ logical operators is useful when
you need to list records not matching with condition that its called ‘True’, if the given
condition is false that only than the side action take place we can use the ‘not’ operator
before conditional expression to reverse the meaning of the expression.
Example :- List for not class to

“Sorting and Indexing” :

Data base generally contains records that have been entered
randomly with any order. We can average record in our data base in a specify order
Visual FoxPro has two commands for organized records in data base mainly sort and
index command.

Sorting means grouping records in particular order say ascending or descending
order base on key field of the records.

Dictionary or telephone directory its example where name subscribers are

arranged in alphabetic order.

Sorting helps us in local required records such as name of sub seriber. The
different user of table may be need record in different frequency. The organization of the
table record in some local order alphabetically, numerically, character wise. It’s two

Visual FoxPro would be able to search through the fusel of records more quickly.

(Note :- Every sorted file require disk space to the original table been sorted as it
creats a deeplicate copy of the original table.)

Sorting a table
Visual FoxPro create a new table using the sort command and stores the
sorted records.
Syn :- Sort to <file name> on <field name> →
The option A specify an ascending order for the field name
The option /D specify a descending order.
The option /e is specify the ignoring case.

(Note) :- Uppper case and lowercase letter are created equally in the sorting order
othecwise uppercase letter comes earlier to lowercase letter.)

Using for clause to sort selected record

You can create a sort file to include only the
selected record by giving specific command which include should be scope and condition
to produce a sorted file that should contain only specify records from the table we will
use the for clause with the “sort command”.
Syn :- sort to <file name> on <field for condition> →

Sorting table on multiple fields :

Same time you may need to sort a data base file on
more than one fields. We can specify multiply fields by using the commas (,).
Syn :- sort to <file name> on <field> (1A/D/C), field z, field3, field4

(note :- if we do not Use (A,or/D or/ visual FoxPro assume that accending order which
is default option an also noted that we can’t sort me fields)

Disadvantage of sort Command :

Sort command has the following disadvantage :-

Socting creates a repeate file equal to the size of orzginal file and therefore waste the disk
If we need several sort orders for a large table we can’t quickly run out of disk space.
Sorting is a slow process and consume a lot of time when we are sorting very large table.
If records are adds in the sorted table this table need to sorted again to maintain the
sorted order.
We can overcome these problems by using “Index” command in
place of sort command. Because indexing is much faster and index retriere data from a
table in order.

↓ ↓
Single Index file Command
(.Idx) (.cdx)
↓ ↓

↓ ↓ ↓

Compact Non compact Structure Non

Indexing is a process of arrange records in a particular order. In index original record

number do not change. The record are indexed in the alphabetic order.

Types of Index
Visual FoxPro provide two types of Index file :-

Single Index File

Compound Index File

Single Index File

Each Index was kept in a repeate file with the extension
“FDX” , If you keep the index file open they automatically updated. Single Index file
can be of two type :-
Compact Single Index file
The compact index file are faster to access and occupy
less disk space to create compact less disk space to create compact index file. We use
“compact” Index file. We use “compact” clausre with index command.
Syn:- Use <table> ←
Syn :- Index on <Exp.> to<.idx>

Non compact Single Index File

It is also faste to access but occupy more disk space
than compact index file.
Syn :- Index on <exp.> to<.idx file> ←

Compound Index File

Compound index File re identified by “CDX”
extension name unlike the idx file each of which can hold only one index. Compound
index file can hold multiple indexing in a single file which are identified by the name
called “tag”.
Compound Index file are of turn types :-
Structual compound Index file
Non structural Compound Index file

Structural Compound Index File

It is a special type of compound index file which is
opened automatically. Whenever open a dbf or table because of a structure is
automatically given the same name as a table or dbf with the extension cdx.
Syn :- index on <field name> tag <tag name
Non Structural or Independent Compound Index File
It is another type of
Compound Index file Which can have a separate name with extension CDX. The files
can not be given the same name has the data base fill or table. It can also called multiple
indexes which are identified by the name called “Tag”.
Syn :- Index on <field name> Tag <Tag name> (of .cdx file name) ←

(Note :- Non structural or independent compound index file neither have the same
primary name as a table file has nor they would open automatically when a table fill is

“Index Commands”
A data base can be open with more than one index however the
order in which record would appear in control only by the single index for an index to
control be active. We can use the several command for this purpose:-

Set index to :
By using this command we can activate any of the indexes in another
words we may say that set index to command is use to open the single index file or
Syn :- Set index to <file name> ←

…………. This part another computer.

Step 1. Select the form wizard option which creates you form to a single table click OK.
First of all form wizard is displayed prompting to select the table on which you want.

Choosing wizards fields

In the available fields in list box click “add all,” button
to select all fields.

Step 2. where we click on next button then we are promoted to specify the style of form
the choice are :-


Then click on Next button for next step.

Step 3. We are promoted to specify the step 3 for sort order of the table records.
We can add upto three fields on which to sort by clicking each desired fields in the
available fields List records then clicking the add button use the radio button to specify
where each field is to be stored in asending or decending order.

(Notes) Ascending radio button is selected by default and click on ‘Next’ button to
go to next.

Step 4. Finish.

Generating the forms :

The final dialogue box enter a title and will be displayed at the
top of the form selected the cave and run form option to saving the forms click on finish
button. Visual foxpro automatically adds the SCX extension.
Using the form control panel
The sent of the button at the bottom of the form are
also called its “control panel”.

Buttons Discriptions

Top Moves record pointer to 1st record

Prev Moves record pointer back one


Next Moves record pointer forward


Bottom Moves record pointer to last record

Print Print a record

Find Display the search dialogue box.

Add Add a new record to the end of the


Edit Allows use, to change in current


Delete Delete current record

Exit Close form

Step 1. Click the top button go to before current record

Step 2. Click the ‘prev’ button go to before current record.

Step 3. Click the ‘next’ button to after the current record.

Some Important Command

Some Important Command

Important of the command window

When you may select from the menu system. You
saw that Visual FoxPro generate the revelent command in the command window. It may
be easier to enter command then to make selection from the menu system. Because if
you are performing a reentre commands you have just use entering or typing command
also gives you capabilities that are no available using the menu system.

Erase command
You may also use the delete command for delete the records we
can use errors command when need of erare the file from disk.
Syn :- Erase <file name

The question mark (?) command

These command are used to ask. Visual FoxPro to
display a particular data item on the screen you can use ?, ??. ???, to display any type of
information such as a field memory variable, a constant, result of a visual FoxPro
functions or even combination of there.

Single question Mark (?) command:-

It display the result of variable functions.
Fields of dbf on the screen this command display the result of variables functions. Fields
of dbf on the screen this command display the result in a new line on the screen. This
command automatically create a new line for display the result on the screen.
Syn:- ?. <Exp.>

Double question Mark (??) command

This command send the result after the
previous printed output this command will not insert a new line for the output and it
display the result in the previous output line.
Syn :- ?? <Exp.>

Set default to command

Visual foxpro use its default desire and directory for the
creating files if you can specify default drive and directory then you can set default to

Triple question command

This command is used to send the output on the printer.
Syn :- ??? <exp.>
Function are one of the undamental elements of visual FoxPro.
They are impact small programme the perform task like testing, information look up and
even processing a function is identified by the parathesis at the end & same of functions
Have in their parathesis they showing how many arguments they need visual FoxPro has
more inbuilt functions and user can may their own function these are called user define


Data and time functions are displaying or printing
the current time and data on reports. Visual FoxPro provide several data and time

The date functions reads the computer system date then supply a date type
value representing it. The display will be in the default format MM/DD/YY or in some
other as specified by the set date command.
Syn :- Date < >

CDOW functions :
This character day of the week function converts the data
expression into day of the week expressed in text form.
Syn :- CDOW (date )

The character month of year function converts the data exp. Into the
month of the year expressed as a name.
Syn :- CMONTH (date)

C to D ( ):
The character to data function convert the data expressed as a text string
into a standard data type expression.
Syn :- C to D (char – exp)

Day ( ) :
The day of month function converts the data expression into the day of the

Syn :- DAY (Date)

DMY ( )
This function returns a date exp in European date/month/year format for the
given date. It always returns the month with a full spelling.
Syn :- DMY <Date – exp)

D to C ( )
This function return achar string containing the date co-representing to a
date expression.
Syn :- D to C (Dae Exp)

D to SU :-
This functions returns an eight digit char string in the format
YYYY/MM/WW for a given date exp.
Syn : D to S (date exp.) , no of month)

The month functions converts date exp into the month of the year as a
Syn : MONTH (Date Exp.)


R TO d ( )
This function return the degree In an angel with the given N number of
Syn :- R to D (radions)

SIGN ( )
This function return a numeric value of ‘1’ -1 or ‘0’ depending on sign of a
numeric exp. If the numeric argument is positive the function returns ‘t’. If the numeric
exp is negative it returns “ -1. If the num argument is ‘0’ it returns ‘0’.
Syn :- SIN (num)

SQRT ( )
This is the square root operator.
Syn : SQRT (num)

SIN ( )
This function return the sin of num. orgument.
Syn :- SIN (num)
TAN ( )
This function returns the tangent of a num argument.
Syn :- TAN (num)

VAL ( )
This function return a num. value co. respondes character value of the digits
contain in the character string exp.
Syn :- VAL (char. Exp.)
(15, pratap nagar)


This function returns the detestation status of one or more records. It returns
logical value such as true ‘T’ or false ‘F’. The deleted function supported on optional
argument which indicate the work area. If you omit the argument it return the status for
the currently selected work area.
Syn :- Delected (alias)

This function is used to test for the existence of a file. You must accept specify any
extension in the file name.
Syn :- file (file name)

This function returns a logical true value when it find the object of the find,
seek, locate or continue commands. If it doesnot find the object. It returns a logical
“false” ‘f’.
Syn : found (alias)

IIF ( )
You can use this function in place of an if, else and if exp. This function checks
the logical exp. For a logical true or false value if it is true it returns the ‘T’ exp. If it is
false it returns the ‘F’ exp.
Syn : IIF (logical exp, true exp, false exp)

Is Alpha ( )
If the arguments begins with an alphabetical character this function returns a
logical ‘T’.

Is coror ( )
If you are using a color display this function returns a logical true value.
Syn :- Is color (exp.)

Is Lower
This function returns a logical true value if the first character is an exp. A
lower case alphabet character.
Syn :- IS lower (exp)
Is Upper :
This function return a logical true value if the first character is an exp. A lower
case alphabate character.
Syn :- Is Upper (exp)

This function returns a true value if a seek was successful.
Syn :- SEK (Exp.)


A string is a series of character and space stored as a single veriable
or array of veriable string type are either numeric, character, numbers, string function are
tools that control the way you can store or display character in the string they also eat.
You find some character about string. The string Function convert numbers to
characters, char to numbers, deci. To num to whole number. The gernal form of a string
function is the function identify command or symbol followed by the Exp in parathesis.

Function (exp)
The exp usually contains the value of a field or memory veriable. It
can also contain a numeric or character string that you enter directly from the keyboard.

All Trim ( )
To remove the loading and blanks from character exp.
Syn :- All trim (char . string)

(ii) ASC ( )
It returns the ASCII code equalent of the left most character is a
character exp.
Syn :- ASC (char – string)

AT ( )
The function search for source exp. In a target exp. And returns the
position where the source exp: was found.
Syn :- AT (source exp, target exp., string)

Between ( )
The function determine if an exp lies between two other exp. It return
a true value if the exp is greater than or equal to the lover limit and less than or equal to
the upper limit.
Syn :- BETWEEN (Source exp, lover limit, upper limit)

This function return the character whose ASCII code is the same as the value of a
numeric exp.
Syn :- CHR (num :-exp)
Ex. CHR (65)

This function returns a relative difference between two character exp.
Syn : Difference (string 1, string2)

This function return a specify number of character.
Syn :- Left (string, no of char)

LEN ( )
This functions returns the length of a char. Exp.
Syn :- LEN (char –exp)
Ex. LEN (“info”)

LIKE ( )
This function compares two char exp and returns a true or false value if the exp
is same return true else false.
Syn :- Like (string exp 1, string exp2)

This function return a specify char exp in lower case.
Syn : Lower (string exp.)

This function returns a char. Exp in capitalize as appropriate for proper name.
Syn :- proper (string)

This function returns a char string resulting form repeting a char exp. To
specified number of times.
Syn :- replicate (char- string, no of times)

This function returns a right most position of a char string or memory variable.
Syn : right (string, no of char, times)

This function returns a char string composed of number of specified blanks.
Syn :- Space (numeric)
Ex. Store space (10) to blank

This function convert a numeric exp, to a char exp.
Syn :- Str (num. exp, length of char string, length of decimal)
This function returns a specify num. of char from a given exp.
Sym :- STUFF (exp, string position, no of char)

This function return a specified num of char from a gives exp.
Syn :- SUBSTAR ( Exp. Starting position, no of char.)
Ex. SUBSTAR ( “information system”, 1,4) info

Remove blanks (promote right side in string)

The function convert dark evp to char exp.

This function allows you to format char string and numeric variable
without the use of @.... say” command.
Syn:- Transform (exp. Picture)

The function trim trailing blanks form an exp
Syn :- TRIM (string)
TRIM (info)

Returns single char describe the data type of any exp.

Value Discription
C Char exp.

N Numeric Exp.

D Date

L Logic

M Memo

U Undefine type of exp.

Syn :- Type (No.)

This function return the specified exp in upper case.
Syn :- Upper (string)

This function convert a char.

The date item store in RAM as memory variable. The
memory veriable are the temporary storage. You can need to assign a name for the
memory variable which can store any kind of date at a time. A memory variable follow
the some rules used for naming a field in data base file that is a memory variable can be
upto to character long. It should been which a letter and the following character can be
letter, number for the under score character. You can’t use space or function marks in
memory variable name.

Visual FoxPro automatically create or provide a file variable letter that are
called system variable which always been with the under score character, the second type
of the variable are called user define variable that are created by user.

Creating and Using memory Variables

Visual FoxPro provide two commands for
creating Memory variable either using the store command or using the assignment
statement”. (Store command)
Syn :- store <exp> to <memory variable name>

For example : Store 100 to A

Store 1000 to B

Store “info” to name

Store ‘T’ to YES

For creating a character type memory variable

A character type memory variable inclose data with single or double contation mark (“
or”) square brackets ({ }). The data value in close with curly brackets.
Ex. Store (info sys) to name

Store {DD/MM/YY} to…. D

When you type the store command V.F display the value store in variable on the screen.
If you wish you can stop redisplay the data type by typing. You can use “set talk off”
command in the command window before entering the variable the format of assignment
Syn :- Variable Name = <exp>
Ex. A= 100
(char) name = “info sys”.
Viewing contents of Memory Variable
V.F display memory command for viewing
the contents of memory variables. This command display the variable name, type and
contents of variable. It also display the number of variable that have define and memory
bytes use in their variables and number of variables.

In display memory command third column display type of variable they

noted by a single letter such as-

C = Character

N = Numeric

L = Logical

D = Date

A = Array

Character Variables
It stores string of character which can be letters, number, or
combination of both.

There are used to store numeric value such as whole number or decimal

Date Variable store date value return in MM/DD/YY format.

If contain Logical value T (True) or Y (yes)

(Note :- You can list memory command in place of “Display” memory command” the
work of “Display memory command” and list memory command are similar exceptthat
“display memory command”)

Creating Empty character Variables with “Space”:

The space command creates an empty character type memory variable of a specify

Ex. Store space (20) to A

A = space (20)

A = “info”
It create character type variable that create 20 space in the empty character variable
are normally used in foxpro programmme to display a blank area for data entry. It can be
upto 65,504 char long for the standard version of foxpro.

Saving & Releasing Memory Variable

Memory variable can be saved in disk file
for letter use you can save the required memory variable in disk file and retriere than
whenever require by using FoxPro command.

To save the memory variable V.F provide “save command” by using this
command you can save all over specified memory variable in specified memory variable
Syn :- Save to <memory variable bame>
Ex. Save to info

When we use the above command all the variable will save in “info memory
variable file.If you like you can specify a different extension name and path.

Ex. Save to ABC au like it

Save to ABC Au except i
Save to ABC au like ???

Releasing Memory Variable

To clear all memory variable V.F. provide the following

Release All
Clear Memory

These command clear the all memory variable :

Syn :- Release all
Clear Memory

Restoring Memory Variable

The M.V save with the save command in memory files and
can be restore with following commands.
Syn :- Restore from <memory file name>

(Note) while loading memory variable from memory file the current variable are clear.

A flowchart is a goaphical representation of the sequence of operation in
an information system or programme flowcharts show the sequerte of instructions in a
single programme a subrutier flowchart uses boxes of different shapes to be not different
types of instructions. The actual instructions are return with in these boxes using clear
and concise statement. These boxes are connected by solid lines having arrow marks to
indicate the flow of operation that is the exact sequence in which the instruction are to be

“Flowchart is a tool to assist programme in preparing is programme”.

“It use is similar to blue print by architecture.

“ A flowchart show the argument of function to be performed in a

programme and then logical relationship. Flowchart is pictorial or graphical
representation of step rutein solve a programme”.

“Its use is similar to blue print by architecture.

“A flowchart show the argument of function to be performed in a programme and then

logical relationship flowchart is pictorial or graphical representation.”

“ A flowchart is basically the plan to be followed when the programme is returned it

acts like a roadmap for a programme and guides in from the starting point to the final
point while writing computer programme”.

Logic of programme return in english understandable by a user.

Symbol and their meaning :

Symbol description

Terminal use for termination or start or end of

Indicate input/ output function.

Indicate processing and indicate

Internal data movement and
It is used for logical
operation and it
Present result in always ‘Yes’ or

Connecter used for altrion normal

flow of

↓ It is uses for connecting boxes

Alogothm : Start
Read/Input A,B
Sum = A+B
Print/output. Sum

Flowchart :-

Q Draw a flow chart with algo. User is “valid for vote or not”

Algorithm : start


Getting input from the user:

There are two command namily “accept and input
commands” that are allows you to get data from the keyboard. When we use accept or
input commands “ we inclose the promot to be asked in double coats (“ “). We also need
to provide a variable to store the answer to the question.

Accept Command :
It is used for get character values from the user and store it in a
character variable
Syn :- Accept “message” to variable name
Ex. Accept “enter by name” to name

Input command
This command is similar to accept command but it is used to get
numeric values from the user. It show the prompt from the user and than accept numbers
from the user through the keyboard.
Syn ; Input “message” to variable name
Ex. Input “enter salary” to salary

@..... Say… Get… command:-

You can also use a combinatio of @--say—Get and—
read command to prompt the user to enter the values from the keyboard.

@ command
This command is one of the most powerful command that can be used for
several purpose.

To display the desired data in a require format.

To input data a field or variable.
To input data through check box. Radio button, push button etc.
To draw or clear boxes and lines on the screen.
Create custom screen format file.

Display data with @ command

This command can be used to display any kind of
data such as field, memory variable, array, result of function etc on the specified position
on the screen. The screen of your computer can be display upto 80 column in each row.
Where each column display one character.
To display any data with @ command you need to specify few condition for the
starting position.
Syn ;- @ < starting position > say <exp>
Ex. @ 11, 10 say “ Ayussi”

Input data with @ Get and @ edit command

The @ --- and @--- edit are similar
commands these commands are used a combination with “read” command to input data
in field memory variable array element.

@--- GET
A field or memory variable name is specified with “@ Get” command this
command display the current value of the get variable.
The “read” command activate the get variable and you can enter the new data in
variable or field.
Syn :- @ <standing position> say <exp> get no.
Ex. @ 10, 5 say “enter name” get name

If you want to enter or edit in a long character field or variable or memo

This command is create a rectangle text editing reason of a specified on the screen
for editing the size of the text editing reason is specified by the size clause.

You can specified the height and width of rectangle or window with the “size”
Syn ;- @ <starting position> edit variable name size <position>

Sum of two values

Set data off

Store 0 to a,b

@ 10,10 say “enter the value of A: get A

@ 11,10 say” enter the value of B: get B
Sum = A+B
@ 15, 10 say “total of both :” tstr (sum)

If-, else---- end if :

If----, else:- end if evalues a condition and excute a block of statement
immediately after if and before else. If it is true its exeuite. If the condition is false the
programme execute the block of following else and before end if of else end if structure
select one of two blocks for execution.
Syn ; if condition <list of commands>
<List of commands>
End of

Ex. Set talk off


Store 0 to a

@ 10, 11 say “enter the value of 0 “ get a read

If (a-1)

? “ It is not one”
End of

Set talk off

@ 10, 4 say “enter the value of a; get a read

If (a-1)

? “it is one”

If (a =2)
?” it is two”
If (a=3)
?” It is three”

End if end if end if

DO CASE --- End case : The do case:

Endicase contract works similar if. Else the
programme looks through the care statement to find if one is correct the programme looks
through the case statement to find if one is correct the programme execute they code
following that case statement after. It is done width the block of code goes on the code
and case.
The statement given below oth wise are
Excuted if the condition in all of case statement are false.

Set talk off

Store 0 to a
Input “enter the value of user: choice : to a
Do case

Case a =1
? It is one”

Case a =2
?” It is two

?” it is entry”

End case



Set talk off

Ans. = .T.
Store 0 to a.b
Do while Ans. = .T.
Use ayushi. Dbf

@ 8,9 say “enter Y for again : get ans

Clear all

This command used to send the pointer to the next field is skip -1 for back.

Repeating a step on a number of steps of a programme for a specified number
of line or until a condition is not is known as looping. Loop is logic which used when
one or more instruction may be executed several times depending on a condition. V.F
provides three loop command.

Do while ---- enddo

Scan --------- End&can
For------------End for

Do while----- Enddo :
Do while loop is most important command in V.F language
when the programme reach this Do while command it checks to confirm if the logic exp.
Evaluated is true if it does the programme executes the command that flow when it gets
end do it loops back. It checks the logical exp. For the new situation. Do while checks
again to sec if the logic exp still evaluated as true if it do it again execute the same
command when the programme discovered the logical exp. Doesn’t evaluates a true it
shop and executes the can end do.
Syn : Do while

Use AA dbf
Append Blank
Replace Roll No with R
Replace name with N
@ 14,12 say “enter y for yes or n for not: get ans read
Enddo use.

For-----------------End for
It executes a set of statements within a loop for a
specified number of times. You can use a memory variable as a counter to determine
many time visual foxpro executes the statement inside the loop.
Syn : For <memory variable> = <exp1> to <exp2>
Ex. : for c= 1 to 10
End for

The for-----end for setup a repeatire loop which repeat a set of statement a specified
number of lines when the for statement is 1st encounter V.F. creates a memory variable
and assign it the initial value exp. 1st than it executes then Programme until reach and
end for, than increment the value of memory variable by one and loop back to the for
statements to check again whether memory variable is equal to exp. 2.

By default for-----end for incrime the counter by can. We can use the optional
clause` “step” to increment the memory variable by a value.
Syn :- For <memory variable> >(exp1) to
<exp.> step <value>
Scan -------------end scaro :
It is another very useful structure for prog in V.F as can loop
act like a do while loop. It read a table file sequencly.
Syn : Scan (scope) (condition) (for/while condition)
Statement 1
Statement 2
End scan

For example
Set talk off
Use ashu. Dbf
For name= “Ayushi”
? name
End scan

Set talk off
Use ashu. Dbf
While salasy > 4000
? Add

In scan end scan we not need include skip command V.F automatically change the
record printer to the next record.


A part from the built in libruary function of V.F user
also can also define and write small programme as function to do.

Such function are called user define function user define function are written a
value. There function should be define by the use. So that such function can perform the
task as desired by the user.

There are various method of processing of data depending on the type
of data and the time available for processing and getting the results.

MODES of processing :

Batch processing
Online processing
Real time processing

Batch Processing
It is one of the oddest method of running programme that is still
being employed by many data processing centers for processing their job in batch
processing mode each user prepare his programme online and submittes it to these
computer. A Computer operator collect programme which have been stored on steps
when a batch of programme into the computer at one time where they are executed one
after another.
Batch pro is also known as serial sequencial offline of processing.

Advantage of Batch processing

The method of batch processing reduce the ideal time of a computer system because
transaction from one of to another and doesn’t requires operator instructions.
It is the most appropriate method of processing for many types of applications such as
paysoll or customers statement where it is not necessary to update information on daily

Disadvantage of batch processing

It reduce time liness in case.

Through efficient from the computers points of view. Batch pro. Makes each job wait in
line at each step.

On line/Ramdom Access processing

Online proc. Permits transaction data to be
fead directly into seconding by online storage devicese.

Real time processing

There are many application that require an immediate in
which a transaction access andupate making is called a real time system an airline
reseuvation, railway reservation, getting a stock market coutation etc.

Defination of “programme”
Programme is a collection of instruction that control the
computer what to do. A programme is called software, which is a programming language
and it is converted into computer machine language by software which called assembless
and compliters.

Programme is a madeup of.


There are the direction that the computer will follow and a particular sequer of
instructions is called the prog logic.

These are reserved space in the computer memory that will accept and hold the
data while it is being processed.

These are fixed value with in the prog that are used for comparing.

Programme like cycle :

Commercial prog, such as payroll accounts, stocle control and
other software share a comman life cycle pattern one method of doing things may work
well for a certain period of a time. The life cycle of the new system three starts again.

Character of good programme:

Read ability

Read Ability


Two way decision statement are based on if----end if--- else--- end if…
Two way decision statement are based on if--- end if, if--- else--- end if
Loops are not custom design with the use of the go to statement. But are base do a use of
for—end for, do while--- enddo.

Importance of structure Prog:

It is much easier for student to debug structure
programme. Student whose go on from structure basic, pasical and COBOL are better
prepared for these languguages

Top Down Design
It is the techniques of breaking problem down into the mlases task tdo
be perform each of these tasks is broken down, into separate sub task is broken down,
into separate sub task. And soon each sub task is sufficiently and simple to be written as
a self contain model or procesure.

Advantage of top down approach

(i) It allows a programmer to remain on top of a problem and view the

developing solution in context.
(ii) It is very good way to deleay decision on problem whose solution may not be
(iii) The problem into a number of sub problems. We have made it easier to share
problem development.
(iv) Since debugging time rews so quickly in to top down design.
(v) In top down development process it is becomes an ideal structure for
managing the implementation.

Bottom up design
When a programme faced with a large and complex problem
then we use bottom up design approach because it may be easy to attack parts of
problem indivirually and taking easier accepts and gaining and tacked the more
difficult task and finally to try and bold them all together to form the complete
solution this is called the bottom up appricate.

Programme document
Document of a software system involve collecting,
organiging, sorting and maintaining and string complete historical record of program
and other documents used or prepared called programme documentation.

------------- The program document of program is a continous process. The prog

specification the algorithm and representation of the prog itself can all be consident
part of the documentation of a prog.

………….. After successfully completing the prog we must insure that over dec is
complete and it is in a finished this includes in technical document. The programmer
whose working with programmer and modifying the completed prog called user level


Array memory variable

FoxPro allows you to create a special type of memory
variable called Array . In an Array Variable data are arranged in a pattern of rows
and columns.
Two types of array

(i) One decimal array

(ii) Two decimal array

You can considered of one dimensional array as a column or row of

Similar a two dimensional array considered as row or column each item in
array is called an element always equal to the number of row multiplied the number of
column into Array.

To create an Array variable you can use the following two commands.

(i) Declare
(ii) Dimension
Syn :- Declare <array name> <size/subcribe>

(iii) Dimensional
Syn : Trimension <array name> <size/sub. Script>

You can identify the element in the array by the use of subscript. The
subscript is an array always start with one (1)

e(Note ; If you toy to address an element whose value is negative or (0) zero
size of array than you get error message sub script out of bounds.)

Relational Database in V.F.

A relation database is define as a database that allow you
to group its data items in one or more independent table. That can be related
to one other by using field to each related table.

Advantage of a relational database:

1. The relational database structure can be efficiently used even with a PC

that has limited main memory and processing capability.
2. Relational database very effective for small database.
3. Relational database is much easier to use because it enable to computer
sys to accomudate enquiries.
4. Relational database is only concerned with data and not with structure.
5. Relational model is very useful for representing most of the real word
object word objects and the relationship among them.

There are 3 type of relationship:

1. One to one :
The simplest type of relationship between two table
is the one to one relationship.
2. One to many
One to many relationship is relationship in which a
record in one table has one or more related record in another table.
3. Many to Many
In many to many relation ship a record in one table
has many co-responding record in a second table and for every record
in second table.

Display Status
If you want to find out data base file that are open
in their work area use the display status command.
This command display status command of the open
database and the cor--- resp ending work area.
Syn : Display status

“Concept of files”

A file is collection of related data that is treated as a single unit.

A file can be of the following two types.

(1) master file
(2) transaction file

(1) Master file

A master file contain record of relatively permanent data type.
Computeries.. master file are created at the time when business information
system is first installed, Master file might be created by laking manual file
folders from filing cabinate and keying disks are then copied by computer on
hard disk to create a permanent master file.
Master file may contain the following
Master file may contain the following fields.
Fields name Type Width

Organization name C 30

Organization add C 50

Budget sales A/c N 15

Budg, Expenditure N 15

Prev. Year sales N 15

Prev. Year Exp. N 15

Profit & Loss A/C N 15

Capital A/C N 15

Reserve & Surplus A/C N 15

Assets N 15

(3) Transaction file

A trans. File contain the records that are used to update the
records of the master file.
Transaction data may be collected automatically or may initially be recorded
on fource doc. And letter concerted to a machine readable format. In either case this
leads to the creation of the transact. Reacord that are stored in transaction file.

It is very important that a transaction file should contain records with the
field and their name in the same order and size and type as that of the master file.
The transaction file may contain the following fields.

Field name Type Width

Sales N 15

Individual exp. A/C C 15

Indi debtors a/c C 15

Indi Creditors a/c C 15

Cash in hand A/c N 15

Cash at bank a/c N 15

Stock a/c N 15

Assets a/c N 15

Linking multiple database file with

Set Relation command
You can ink two database file that are opened in diff.
work area. The linking of two dbf or more files is done on a command of field with “set
relation to” command.
To link two files we follow the following rules

(1) Each database files must be open in separate work area.

(2) Their should be a comman filed among these files.
(3) The file should be indexed on the common field.
(4) Use “set relaltion to “command for creats a relation.


This command is used to links two or more open database
Syn ; Set relation to <commonfield> into <field name>
Syn : Set Relation to <common field> into CFNI>
<common field> into <cfn2>
Selecting a work area
The “select” command is used to select a work area with “select”
you have to provide the work area reference. You can refer to a work area by its work
area no or they were also refered to by a letter.

Ex. Select 1
Use ayushi
Index on code to c
Select 2
Index on code to c2
Select 1
Index on code to (1
Select 3
Index on code to (2
Select 1
Set relation to code into Ashi, code into ASHU

code Name Amount
code Address salary
code phone Description

Updating Information with “update”command :

This command works on two data base
files with a common fields. They must be indexed on common field.
Syn : Update on <common field> from <file child name>
Replace < target file name> with <file child name>
<source field name>

Select 1
Use Ayushi
Index on code to C
Select 2
Index on code to c1
Update on code from ASHU replace amount with ASHI Salary.

On using the update commad V.F automatically update all records from required field on
specified field.

Appending records from other fields from

Append from command”
You may like the transfer record from one database file to another
you can use append from command.
Before using this command we should be noticed following points.

1. The source file must be open

2. The structure of data files must be same.
Syn ; Append from <target files> fields <fields>
Ex. Append from Master dbf fields cods, amount

Joining two database file with join command

The join command join two database file to create a new database file . You
can include specified or all fields in the new database files.
Syn ; join with <child> to <new file> for <common filed>= <child field

Ex. Select
Use master
Index on code to c
Select 2
Use transaction
Index on code to c1
Join with 2 to ashi for code = 2 amount
Join with 2 to ashi for code= fields name, add, 2 amount

Coping Records form to other files with

Copy to command”

You can copy all or selected records from a database file in use to create another
database files. Before using this command the fource file must be open.
Syn ; Use <fource file>
Copy to <target file>

This copy command creates a new <target fru> dbf and copy all the record from
the fource file.

You can also use field clauses with this command

Syn :- copy to <target file> fields <fields list>

If you want to delete the copied file than use set delected on command before
using “copy to”command” by default it is dbf.
Coping structure of a dbf
The “copy structure” command allows you to copy the complete or
partial to the structure of the data base in use.
Syn ; Ise <dbf name>
Copy structure to <target file>

If you want to copy the structure to partial. You can use fields clauses with
copy structure command.
Syn : Copy structure field <field list> to <target file>

Note : Before using the copy structure command you need to open the database

Squencial file:
A squencial file is one to which the record are stored in some
sequence or order.
Asequencial file organization is best suited for mortar file on which batch
processing is done.

Advantage of requencial file

(1) File design is simple

(2) Location of records requires only the key records
(3) Law case file medium such as a tapes can be used.

“Relative file” :
A relative file doesn’t use on index to access record
randomly. The key field of the each record is used to calculate the record
relative location in the file stored on the disk.

”Indexed file” :
An index file is one that has an index for looking up location
of records on a disk. The index on a disk is similar to a book index which has
unique subject and their cor responding page number.

Advantage of index file

(1) Immidiate access to report I n possible.

(2) Upto the minute information will always be available on the file.
(3) No new master file is created for update a random accese file.

1. Relatively on expensive medium is used.
2. Not well suited for batch processing
(1) Seek and find are both method for fast searching of data base. They
matching value as specified along with the command.
(2) Find and seek both move the record printer to the record in the table
whose index key match the char. Exp.
(3) They reqwred the selected table to be index.
(4) Find is used to search char. Exp and seek can be used for numeric, char
and even date exp.


A part from the built in library function of visual foxpro. User define functions should be
codified by the user. So that such function can perform the task as desired by the user.
Syn : Function <function name>

Returns [Expression]
End function.

Ey. Function multi

M =0
End function

The function statement designates the beginning of a function in a programme and

identify the function by name. You can include “return” anywhere in function to return
control to the calling program or to the another program.

Select Command

The command retrives data from a table.

Syn : Select from (.DBP)
“ From” is the keyword in this command, which must be present in every select.

The “select” clause is use for the field list and “from” clause specifies the DBF
which the field are to be selected.
Syn : Select <field list> from (.DBF)


We use function with the select command. These function are sum average, max min,
Syn : Select sum (field name) to total from <DBF)
Object linking and embedding
Object linking and embedding is a method by which an
object create in another application OLE is way of transferring and sharing file among
application by passing information created in one application patkoger to another
application polikager.

Linking is the term use to describe the establishment of a connection
between the source and destination document. A linking object maintain connection
between the two document. When the indexation change in the source document the
change are reflected in the destination document automatically.

Embedding is the term use to describe the insertation of a copy of an
object from an application to another to another application.

Sequential file
A sequential file is one in which the record are stored in jome sequence or
A sequential file organization is best suited for master files on which batch
processing is done.

Advantage of sequential file

1. File design is Simple.
2. Location of sources required only the key record.
3. Now lost file medium such as a tapes can be used.

Relative file
A relative file doesn’t use an index to access record ranabdomly. The key field of the
each record is used to calculate the records relative location in the file stored on the

Indexed file
An index file is one that has an index for looking up location of records on a disk.
The index on a disk is similar to a book index which has unique subjects and their
corresponding page number.

Advantage of index file.

1. Immidiate access to record is possible.
2. Up to the minuk information will always be available on the file.
3. No new master file is created for updating a random access file.

1. Relatively an expensive medium is used.
2. Not well suited for batch processing.
Creating a Query
Using query wizard we can display data in a table in what ever
way it is most useful for us. Query control the following items:

1. Which fields of a table are displayed.

2. Which records of a table are displayed
3. The order in which records are display

To create a query do this

1. Click file menu and choose new or click on new on standard tool bar.
2. Select the query radio button.

Query designer
In visual FoxPro we create queries in a special window called the queries designer. The
query designer regrs to the way that V.F.P allows us to get information from table queries
like tables and indexed are saved aspiles these query file are small p;rogramme by
running the query programs.

Creating ce query using

Query designer

You can also start a new Query from the command window by typing create
query and pressing enter key.
Syn : Create Query<Query name>
If query dsesigner isn’t shown than choose view menu and select tool bar option when
toolbar dialogue box is displayed click the Query designer and click on O.K.

Selecting fields to include in the Query click on Add button include the fields in
the selected out put.

Running the query

1. We can select the run Query from the Query menu.
2. We can also press ctrl+Q keys to run the Quary.

Query wizard :
We can start query wizard in following ways.
1.To start a Query wizard open the tool menu and select wizards and select Query
option. It display a wizard selection dialogue box.
2Choose “Query” wizard and click on ‘OK” button.
3. Open the new dialogue box clicking on the “new” toolbar button.
4. Add the selected fields by click on “Add” button & click on “next button”.
5. Filter records ex can reduce the number of records by creating expressions that
would filtes records from the table. You may create two expression and connect
them with and or or click on next button.
6. To display the sort order dialogue box here we can select up to fields or and index
tag to dsetermine the order in which our query result will be sort select accending
to sort the result in accending order or decending to sort the result in desencing
order click on next button.
7. Than display step-4 (a) limit records here ex can limit the number of records in
the view, based on a present of records . Click on next button to display the finish
pane select the Save query button to save the Query and than Click “finish” button

Query with “find” command

Find always begins its search at the first record in the index table and continous until
the specified value is found or the end of the file is encounterd.
Syn : Find <character string>

Note :
When using the find command an index file is open first “AND”you don’t
have to put around a character string with the find command.

Query with “Seek” command

Seek command find the first record in index table that matches the required
conditional expression. An expression may be numeric values or character string. It
seek command is used with a character string than the string must be enclosed in
single or double quotes or square brackets.
Syn ; Seek < expression >

Query with “,list for” command

Syn : list for <fields name>= <expression>
Syn : List for <field name>= <exp.>
<fields list>
Syn : List for pay > 2000

Query with display for command

Use display command to search for specific information.
Syn : Display <fields><field list> for
<field name> = <expression>

Query with locate command

Query skps

Step 1 → Select fields

Step 2 → Select table
Step 3 → Filtes records
Step 4 → Sort records
Step 4a → Limit records
Step 5 → Finish

The extension name of the quary is “QPR.

“Business Application
“Designing analusis and Development”

It is very important to plan the accounting system carefully, since it must
satisfy an audites, manager, the book kepper, the company share holder, creditors and

What is financial Accounting Accounting System (FAS)

The financial accounting system mentain the voucher book of account and ledgers
and keep other necessary books.
PAS is helps in a account book keeping. Accurate bnook keeping ensures easier
consolidation of the profit and loss account and balance sheet.

Why computerized financial system:

Financial Accounting system give the professional accountants the
tools to review the financial records of a company or client. While reducing time spent
by the accountant in collecting basic documents and allow time for more analysis.

A strong accounting system is on basic for strong management for

the design of the accounting system is more important planning computer helps in
executing all the above characteristics fact.

Function to fas
Various accounting section FAS such as-
(1) Accounts Receivable System (ACRES)
(2) Account Payable System(ACPAYS)
(3) Inventory management System (INMAS)
(4) Payroll Recording System (PAYS)

This system passer entry recording of sale, cash receipts and other
Create General entry to recording invoices and credits for goods
and service and other payments.
3. INMAS :
In general entry for the cort of goods sold and purchase and other
adjustment to the inventory account.
4.PAYS :
Entry are for payroll:

The main advantage of computerizes financial accounting system

is an time saver for the company since many entry are made daily.

Master files or transaction files

Master files

1. General ledger Master

It contains fields like :

(a) General ledger code on account code :

(b) Narration on account head
(c) Yearly balance detail
Debit and Credit flag
Balance amount
(d) Monthly balance detail
Debit and Credit flag
Balance amount
(e) Last date transaction

2. Subridary ledger master

The subridiary ledger master contain fields.

(a) Subsidiary ledger code:

(b) Narration or sub head:
(c) General ledger code:
(d) Yearly balance detail:
Debit and Credit flag
Balance amount
(e) Monthly balance detail:
Debit and credit flag
Balance amount
(f) Last date transaction

Transaction file :
(1) Voucher transaction file
Voucher (Transaction file contain field)
(a) Voucher Type
(b) Voucher Number
(c) Voucher date
(d) General ledger code
(e) Subbridiary ledger code
(f) Narration
(g) Debit on credit flag
(h) Amount
(I)Reference document number
(j)Reference document date
(k)Due date
(l)Bank code (for bank voucher only)
(M) Bank code (for bank voucher only)
(n) cheque number
(o) cost center code.

Cost center transaction file

Cost center codes file contain fields like-
(a) Cost center case
(b) Cost center description

Master and Transaction file

(1) Master file
Financial accounting system is the one where all transaction
like income reveived, expenditure are recorded.


Cost Center code file [transaction file]
Cost center codes file contain fields like-

(a) cost center case

(b) cost center description

(1) Master and transaction file :

(1) Master file:

Financial accounting system is the one where all transaction
like income received, expenditure are recorded.
(ii) Transaction file:
Transaction file are retrieved and printed, analysis, stored
and processed for further information.

“Inventory Controll”:

What its an inventory

We see goods all around us, in departmental store, factory, at Gas
station and so on any business has to keep sufficient stock of goods and other materials to
support its production requirement.
“A record of available goods in the store is known as inventory.

Inventory Controll Aim

The basic aim of inventory control is to provide answer to two
(i) How much stock should one order?
(ii) When does one order for more stock?

Kinds of Inventory
Most product go through several stage until the final product is
created the raw material go through various production process. The output of each stage
of processing become the input to the next stage and so on. This is continue till the
product is finally created.

There are three kinds of Inventory :

(1) Raw material
Which company the basis of manufacturing.
(2) Goods in Process
Which goods is going on under production.
(3) Finished Goods:
Which are the end production or final touch of product.

Factor of influencing inventory:

The objective of inventory control is to minimize cost. While
taking Inventory control decision, two important factor have:
(1) Demand
(2) Lead time

Refers to the quantity of finished goods that can be sold during fixed
period of time.

When an order is placed, it may take some time, before it is actually executed. The
actual time taken to fulfill the order is called lead time.

Note Ordering at the right time minimize storage and other related cost.

Type of Inventory (Cost):

(1) Ordering Cost :

Each time an order is placed, administrative cost are incursed.
They are called ordering cost.
Note : Administration expenses is that salary, rent, printing & stationary, telephone,
Rent (official) repair expenses of all other official expenses.

(2) Procument cost:

Procument cost is the multiply of quantity of good ordered and the
Price per unit.

(3) Inventory Carring Cost:

This included the money spent on mentains of goods
Interest on investment in inventory, insurance premium paid on inventory ware
housing cost.

(4) Stock out Cost :

The many lost due to non stock of goods, if it can be quantified, is
Known as stock out cost.

“Inventory control process”

How much to order

The right quantity has a perfect balance between the various cost
and the size of ordered placed. Proper balance minimize the total cort . This is called
economic order quantity [EOQ] module that influence are-

(1) EOQ