SlideShare a Scribd company logo
1 of 10
FoxPro
FoxPro is very powerful Database Management System.
Its integrate development Environment allows
programmer's language. It is both an interpreter and true
compiler. As interpreted language, it translates each
command into computer instructions, as it is executes the
translation time, most possibly during loops.
A compiler improves performance by translating command
to machine instructions just once. It replaces commands
such as PRINT or LIST with blocks of machine code. This
compiled programs run faster than interpreted codes.
FoxPro supports arithmetic functions such as addition,
subtraction, multiplication, and division. It also provides
many special mathematical and financial functions.
The main screen combines a menu bar across the top line
with a command prompt environment based on the
command window. FoxPro opens the command window at
the beginning of each session. Commands entered into it
execute immediately.
WHAT IS A FOXPRO DATABASE?
It is a collection of related and relevant information. It
could be check register, accounting ledger, payroll, client
list or inventory. Or it could be any of thousands of
applications in business, education, engineering, and the
professions, the sciences and other fields.In general, a
database consists of number of RECORDS .In FoxPro, a
record may consist a number of items such as employee
code number, employees name, address, date of joining,
salary, designation etc. A number of such items in
FoxPro's record are known as FIELDS. Number of fields
make up a single record of single person, and number of
such record made up an entire DATABASE.
Eg: Employee Registry
Field Field
Field
Field 3 Field 4
1
2
5

Field 6
Code Name Address
R001 Raman

Date of
Salary Designation
Joining

A/3
01-0112,500 Accountant
Andheri 1967

154/
03-06Personal
6,000
Andheri 1988
Secretary
Set commands: FoxPro environment functions.

Goo5 Gauri

Set talk on/off : Determines whether or FoxPro display
command result.
Set Bell on/off : Turns the computer bell on or off and set
the bell attributes.
Set status on/off : Set the status bar on or off.
Set safety on/off : Specifies the format for date expresses
DD-MM-YY
VARIABLE TYPES
Character type Date type Numeric type Logical type
Store space (35) time.
Store {99/99/99} birthdate
Store 0 to Salary,
Store .1. pass fail ('.Y.', '.N.') OR ('.T.', '.F.')
DATE FUCTIONS:
?DATE () : Return the current system date. ?TIME () :
Return the current system time.
?Day (date()) : Return the numerical day of the month or
the given date expression. Example:
Store {03/10/75) birthDate . The birthday along with
other command.
?Month (date()): Return the numeric month for the given
date.
?Year (date()) : Returns the numeric year of the given
date.
?Dow (date()): Return the numeric day of the week for
given
date. ?Cdow (date()): Return the character day of the
week for given date.
?Dtoc 0 : will convert Date type variable to character
type. We cannot find day, month of variable which is of
character type.
?CtoD (): Converts a character expression or variable to a
date related function to Cow, month on when a character
expression is converted to date expression. Eg. Store
CtoD to vdate.
DATABASE FUCTION :
Create : Creates a new database file create
Employees.dbf.
Use Emplyoees.Dbf: Use command opened the database
file and it's associated in.
Close all: - Closes all open databases, index file etc.
Append - use for adding records in a database. First open
database with USE command then appends records in it.

Modify structure: - Allows adding new or deleting of in
database field. Display structure: - Display the structure
of database. Rename <filel> to<file2>: Renames the
name of <filel>to<file2> Edit - Allows the user to edit or
modify record.
Replace: - Replace command replaces the field with
mentioned text or values.
Syntax:- Replace all bonus with 7500 for Designation
"officer "
You can also use. And. . or. clause for applying two or
more condition for query record.
LIST AND DISPLAY FUCTION
(a) List: - Display the entire record list.
(b) List all: - Same as list command.
(c) List off: - Will list the records without displaying the
record numbers.
(d) List for name="s" Example. List for salary>2500 .and.
salary<4750
(e) List Code, Surname, Firstname, Salary, Doj for
Doj>={01/04/1998}
(f) List to printer
(g) You can use. And., Or. Clauses with list for applying
two or more conditions. (h) List next next 3
I) Display: used for displaying a record.
II) Display all: Displays all the records but screen at a
time. List commands does the same function but the
records simply scroll upward on the screen if all the
records do not fit on the screen.
Ill) Display Memory: - Display the current contents of
memory variables and arrays.
MOVING TO RECORDS
Go/Goto<recordno>: Positions the record pointer on the
specified record number in dbf. Eg.:
Goto 16
Go top: Position the record pointer on the first record of
the database.
Go bottom: Position the record pointer on the last record
of the database.
Skip: Positions the record pointer on the next record from
the present record. Try Skip+5 and also Skip -3 while
status is on. A database should be used or open, and
observe which record becomes your present record.
BROWSING THE RECORDS
Browse:
Browse for NAME="s"
Browse fields NAME, SALARY, DESIGNATION
Browse nomodify, nodelete, noappend: Browse the
records but you can not modify them or
delete them or add more records to your database.
DELETING RECORDS
Delete: delete the record on which your record pointer is
positioned.
Delete for: Used for deleting records which match the
conditions specified, e.g. Delete for
dateofjoin>{01/01/1969}
Recall: - Unmarks the records, which is marked for
deletion. Only unmark the record if the record pointer is
positioned on the deleted record.
Pack: Permanently removes the record marked for
deletion. Once records are packed they cannot be
Recalled.
Zap: The use of this single command permanently deletes
all the records of the entire database.
Deleted (): this command along with list command will
display only records, which are marked for deleted.
Syntax: list for deleted().
SPECIAL FUCTIONS:
Note: A database has to be opened for working with the
following commands.
? Fcount ()- Returns the number of fields in an open
database.
? Recsize Q-Display the size of the records.
? RecnoQ- Displays the current record number.
? Reccount()-Counts the number of records in a database
file.
? Reccount()-Counts the number of records in a database
file.
? Count- can be used for counting records, which match a
criteria. E.g. Count for Salary>4500
? Int (<expN>)- Returns a Integer portion of a numeric
expression. ? Len (<expN>) - Returns the number of
characters in a character expression.
?Abs(<expN>)-Retum the absolute value of the specified
numeric expression. ? Right (Vname2): Returns the
specified number of rightmost characters from a character
string.
? Left (<expN>)- Return a specified numeric of character
expression starting with the leftmost character.
? Replicate ("*", 35) -Returns a character string that
contains a specified character expression repeated a
specified number of times.
?CurDir()- Returns the currents MS-DOS directory.
?Dikspace()- Returns the number of bytes available on the
default disk drive. Lower () Returns a specified character
expression in lower case letters.
? Upper (): - Returns the specified character expression in
upper case letters.
TRIM FUCTIONS
"xname=Abraham Lincoln"
Ltrim():-Returns the specified character expression with
leading baink removed. ?Itrim(xname) will remove blank
from name.
RtrimQ:- Return the specified character expression with
trailing blank remove
?rtrim(xname): will remove blank from name.
SubstrQ:- Return a specified number o character from the
given expression or mem field.
Zname="Anthony"
?Substr(zname,l,3) will display only 'ant'
?substr(zname,5,2) will display from character and 2
more characters of the variable Only 'on' will be displayed.
ARRANGING RECORDS AND VIEWING THEM IN
ASCENDING (A-Z) (0-5) OR DESCENDING (Z-A)
ORDRER.
RECORDS ENTERED IN THE DATABASE NEED NOT BE IN
ORDERED form. But while
printing displaying reports, we need to show them in a
ordered form so as to give meaning to the
reports. Sometimes reports may be needed on
alphabetically listing of the Salesman name or on
the Data wise bill entries.
From one data to another may be required for reporting
and extracting information from them.
Hence it is of utmost importance that records entered
should be arranged so as it arrive to
decision-making. FoxPro provides two simple and most
efficient ways to arrange the record
entered and not only to view them in that form but also to
query them so as to quickly search to
the user mentioned criteria.
These two methods are 1) SORT 2) INDEX.
A) SORT: is a mentioned in which the user mentions the
field on which he wants the performs the sort and the
output is generated and stored in a different target
database file contain the sorted output on the fields
mentioned in the sort command. You have to open the
target database file to view the sorted records. /D is use
to sort in a descending order, otherwise it will sort in
ascending order.]
Syntax:
Use <filename>
Sort on <field> /D to xfile -/D is used for Sorting in a
descending order.
Use xfile
Browse
To sort on more than one field:
Use SALES DBF
Sort on STATE, CITY to STATE
Use STCT.dbf
Browse
a) INDEX: Index command arrange the record in
ascending or descending order but the fundamental
different between sort and index is that, with Index
command a number of the database which are indexed in
Ascending or Descending order. In the sample given
below, in the friends' database the field has three names,
which are not in alphabetical order. If we index it and
store it in the index file name.idx only the record numbers
will exist but arranged in such a way that the
corresponding names are in alphabetical order.
Hence we have to associate out source database
(Friends.dbf) with the index file (name.idx) to view the
records of the source database in the ordered form. When
some more records are added in the source database the
index file will have to be build up again can be surd to
search records matching particular criteria when the
database very huge (e.g. more than 60,000 to 70,000)
records. The index file being smaller in size takes less
space.
OTHER COMMAND
Clear all: Clear all the memory variables and activate
Windows, menus, popup etc from the memory.
Clear : Clear the screen or Active window.
Quit: To exit from FoxPro. Be sure to close all open
database and other files before quitting. Run or !
(Exclamation marks) - is used or running a MS-DOS
command without quitting it. IV) FILE DELETING
COMMANDS
Delete File <Filename>: Deletes a file from the disk.
Erase <File name>: Erases the file from the disk.

REPORT AND LABEL
REPORT: This command produces reports using report
layouts that have been designed earlier. If CONSOL has
not been SET OFF, the report is displayed on the screen.
They can also be sent to the printer or a text file.
Before this command is used, the report form must have
been created a saved in a file. The command CREATE
REPORT lets you design these report form using the report
Layout Window. The default extension for these files FRX.
LABEL: This command produces mailing labels for the
database file that is open in the currently selected work
area if CONSOLE has not been SET OFF, the label at
displayed on the screen. They can also be sent to the
printer or to a text file.
Before this command is used, the label form must have
been crated and save in a file. The command CREATE
LABEL lets you design these mailing label from using the
label layout window. The default extension for this file is
LBX.
Create a one .dbf file with the help of following field and
solve the questions answer.
Field
Type Width
Name
Name

Character 20

DOJ

Date

Eng

Numeric 3

Hindi

Numeric 3

marathi

numeric

8

3

More Related Content

What's hot

Introduction & history of dbms
Introduction & history of dbmsIntroduction & history of dbms
Introduction & history of dbmssethu pm
 
Database Design
Database DesignDatabase Design
Database Designlearnt
 
Introduction to Database
Introduction to DatabaseIntroduction to Database
Introduction to DatabaseSiti Ismail
 
File based approach
File based approachFile based approach
File based approachPreethaAS
 
Windows form application - C# Training
Windows form application - C# Training Windows form application - C# Training
Windows form application - C# Training Moutasm Tamimi
 
Microsoft Dynamics AX 2012 - X++ Compiled to CIL
Microsoft Dynamics AX 2012 - X++ Compiled to CILMicrosoft Dynamics AX 2012 - X++ Compiled to CIL
Microsoft Dynamics AX 2012 - X++ Compiled to CILFabio Filardi
 
Introduction to Database Management System
Introduction to Database Management SystemIntroduction to Database Management System
Introduction to Database Management SystemHitesh Mohapatra
 
Database Management System, Lecture-1
Database Management System, Lecture-1Database Management System, Lecture-1
Database Management System, Lecture-1Sonia Mim
 
Microsoft access
Microsoft accessMicrosoft access
Microsoft accessReshmiSV
 
Lecture 08 distributed dbms
Lecture 08 distributed dbmsLecture 08 distributed dbms
Lecture 08 distributed dbmsemailharmeet
 

What's hot (20)

Sql - Structured Query Language
Sql - Structured Query LanguageSql - Structured Query Language
Sql - Structured Query Language
 
Introduction & history of dbms
Introduction & history of dbmsIntroduction & history of dbms
Introduction & history of dbms
 
Database Management System
Database Management SystemDatabase Management System
Database Management System
 
Database Design
Database DesignDatabase Design
Database Design
 
File organization
File organizationFile organization
File organization
 
Introduction to Database
Introduction to DatabaseIntroduction to Database
Introduction to Database
 
Triggers and Stored Procedures
Triggers and Stored ProceduresTriggers and Stored Procedures
Triggers and Stored Procedures
 
user defined function
user defined functionuser defined function
user defined function
 
Relational model
Relational modelRelational model
Relational model
 
File based approach
File based approachFile based approach
File based approach
 
SQL commands
SQL commandsSQL commands
SQL commands
 
Windows form application - C# Training
Windows form application - C# Training Windows form application - C# Training
Windows form application - C# Training
 
Microsoft Dynamics AX 2012 - X++ Compiled to CIL
Microsoft Dynamics AX 2012 - X++ Compiled to CILMicrosoft Dynamics AX 2012 - X++ Compiled to CIL
Microsoft Dynamics AX 2012 - X++ Compiled to CIL
 
Sql join
Sql  joinSql  join
Sql join
 
Introduction to Database Management System
Introduction to Database Management SystemIntroduction to Database Management System
Introduction to Database Management System
 
12 SQL
12 SQL12 SQL
12 SQL
 
MySQL Data types
MySQL Data typesMySQL Data types
MySQL Data types
 
Database Management System, Lecture-1
Database Management System, Lecture-1Database Management System, Lecture-1
Database Management System, Lecture-1
 
Microsoft access
Microsoft accessMicrosoft access
Microsoft access
 
Lecture 08 distributed dbms
Lecture 08 distributed dbmsLecture 08 distributed dbms
Lecture 08 distributed dbms
 

Similar to NOTES ON "FOXPRO"

005 foxpro
005 foxpro005 foxpro
005 foxproSMS2007
 
Mysqlppt
MysqlpptMysqlppt
MysqlpptReka
 
AARAV NAYAN OPERATING SYSTEM LABORATORY PCA
AARAV NAYAN OPERATING SYSTEM LABORATORY PCAAARAV NAYAN OPERATING SYSTEM LABORATORY PCA
AARAV NAYAN OPERATING SYSTEM LABORATORY PCAAaravNayan
 
The Easytrieve Presention by Srinimf
The Easytrieve Presention by SrinimfThe Easytrieve Presention by Srinimf
The Easytrieve Presention by SrinimfSrinimf-Slides
 
Bozorgmeh os lab
Bozorgmeh os labBozorgmeh os lab
Bozorgmeh os labFS Karimi
 
Operating System Laboratory presentation .ppt
Operating System Laboratory presentation .pptOperating System Laboratory presentation .ppt
Operating System Laboratory presentation .pptPDhivyabharathi2
 
Basic shell programs assignment 1_solution_manual
Basic shell programs assignment 1_solution_manualBasic shell programs assignment 1_solution_manual
Basic shell programs assignment 1_solution_manualKuntal Bhowmick
 
Sql introduction
Sql introductionSql introduction
Sql introductionvimal_guru
 
Oracle 9i notes(kamal.love@gmail.com)
Oracle 9i  notes(kamal.love@gmail.com)Oracle 9i  notes(kamal.love@gmail.com)
Oracle 9i notes(kamal.love@gmail.com)Kamal Raj
 
1) List currently running jobsANS) see currently runningcommand.pdf
1) List currently running jobsANS) see currently runningcommand.pdf1) List currently running jobsANS) see currently runningcommand.pdf
1) List currently running jobsANS) see currently runningcommand.pdfamaresh6333
 

Similar to NOTES ON "FOXPRO" (20)

005 foxpro
005 foxpro005 foxpro
005 foxpro
 
Linux com
Linux comLinux com
Linux com
 
Linux
LinuxLinux
Linux
 
Linux
LinuxLinux
Linux
 
Linux
LinuxLinux
Linux
 
Linux
LinuxLinux
Linux
 
Mysqlppt
MysqlpptMysqlppt
Mysqlppt
 
AARAV NAYAN OPERATING SYSTEM LABORATORY PCA
AARAV NAYAN OPERATING SYSTEM LABORATORY PCAAARAV NAYAN OPERATING SYSTEM LABORATORY PCA
AARAV NAYAN OPERATING SYSTEM LABORATORY PCA
 
The Easytrieve Presention by Srinimf
The Easytrieve Presention by SrinimfThe Easytrieve Presention by Srinimf
The Easytrieve Presention by Srinimf
 
Bozorgmeh os lab
Bozorgmeh os labBozorgmeh os lab
Bozorgmeh os lab
 
Operating System Laboratory presentation .ppt
Operating System Laboratory presentation .pptOperating System Laboratory presentation .ppt
Operating System Laboratory presentation .ppt
 
ADVANCE ITT BY PRASAD
ADVANCE ITT BY PRASADADVANCE ITT BY PRASAD
ADVANCE ITT BY PRASAD
 
Basic shell programs assignment 1_solution_manual
Basic shell programs assignment 1_solution_manualBasic shell programs assignment 1_solution_manual
Basic shell programs assignment 1_solution_manual
 
Sql introduction
Sql introductionSql introduction
Sql introduction
 
Oracle 9i notes(kamal.love@gmail.com)
Oracle 9i  notes(kamal.love@gmail.com)Oracle 9i  notes(kamal.love@gmail.com)
Oracle 9i notes(kamal.love@gmail.com)
 
Sql loader good example
Sql loader good exampleSql loader good example
Sql loader good example
 
INTRODUCTION TO STATA.pptx
INTRODUCTION TO STATA.pptxINTRODUCTION TO STATA.pptx
INTRODUCTION TO STATA.pptx
 
1) List currently running jobsANS) see currently runningcommand.pdf
1) List currently running jobsANS) see currently runningcommand.pdf1) List currently running jobsANS) see currently runningcommand.pdf
1) List currently running jobsANS) see currently runningcommand.pdf
 
40 basic linux command
40 basic linux command40 basic linux command
40 basic linux command
 
40 basic linux command
40 basic linux command40 basic linux command
40 basic linux command
 

More from CHANDRA PRAKASH SINHA

More from CHANDRA PRAKASH SINHA (6)

Foreign Direct Investment & Cross Border Acquisitions
Foreign Direct Investment & Cross Border AcquisitionsForeign Direct Investment & Cross Border Acquisitions
Foreign Direct Investment & Cross Border Acquisitions
 
Human resource management
Human resource managementHuman resource management
Human resource management
 
Heath Services
Heath ServicesHeath Services
Heath Services
 
Commercial policy
Commercial policyCommercial policy
Commercial policy
 
Economic development (2)
Economic development (2)Economic development (2)
Economic development (2)
 
RELIANCE PETROLEUM PRESENTATION
RELIANCE PETROLEUM PRESENTATIONRELIANCE PETROLEUM PRESENTATION
RELIANCE PETROLEUM PRESENTATION
 

Recently uploaded

Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxMan or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxDhatriParmar
 
week 1 cookery 8 fourth - quarter .pptx
week 1 cookery 8  fourth  -  quarter .pptxweek 1 cookery 8  fourth  -  quarter .pptx
week 1 cookery 8 fourth - quarter .pptxJonalynLegaspi2
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfPrerana Jadhav
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxSayali Powar
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmStan Meyer
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQuiz Club NITW
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptxmary850239
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...DhatriParmar
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDhatriParmar
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...DhatriParmar
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataBabyAnnMotar
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 

Recently uploaded (20)

Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxMan or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
 
week 1 cookery 8 fourth - quarter .pptx
week 1 cookery 8  fourth  -  quarter .pptxweek 1 cookery 8  fourth  -  quarter .pptx
week 1 cookery 8 fourth - quarter .pptx
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdf
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and Film
 
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptxINCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx
 
Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"
 
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped data
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 

NOTES ON "FOXPRO"

  • 1. FoxPro FoxPro is very powerful Database Management System. Its integrate development Environment allows programmer's language. It is both an interpreter and true compiler. As interpreted language, it translates each command into computer instructions, as it is executes the translation time, most possibly during loops. A compiler improves performance by translating command to machine instructions just once. It replaces commands such as PRINT or LIST with blocks of machine code. This compiled programs run faster than interpreted codes. FoxPro supports arithmetic functions such as addition, subtraction, multiplication, and division. It also provides many special mathematical and financial functions. The main screen combines a menu bar across the top line with a command prompt environment based on the command window. FoxPro opens the command window at the beginning of each session. Commands entered into it execute immediately. WHAT IS A FOXPRO DATABASE? It is a collection of related and relevant information. It could be check register, accounting ledger, payroll, client list or inventory. Or it could be any of thousands of applications in business, education, engineering, and the professions, the sciences and other fields.In general, a database consists of number of RECORDS .In FoxPro, a record may consist a number of items such as employee code number, employees name, address, date of joining, salary, designation etc. A number of such items in FoxPro's record are known as FIELDS. Number of fields make up a single record of single person, and number of such record made up an entire DATABASE. Eg: Employee Registry Field Field Field Field 3 Field 4 1 2 5 Field 6
  • 2. Code Name Address R001 Raman Date of Salary Designation Joining A/3 01-0112,500 Accountant Andheri 1967 154/ 03-06Personal 6,000 Andheri 1988 Secretary Set commands: FoxPro environment functions. Goo5 Gauri Set talk on/off : Determines whether or FoxPro display command result. Set Bell on/off : Turns the computer bell on or off and set the bell attributes. Set status on/off : Set the status bar on or off. Set safety on/off : Specifies the format for date expresses DD-MM-YY VARIABLE TYPES Character type Date type Numeric type Logical type Store space (35) time. Store {99/99/99} birthdate Store 0 to Salary, Store .1. pass fail ('.Y.', '.N.') OR ('.T.', '.F.') DATE FUCTIONS: ?DATE () : Return the current system date. ?TIME () : Return the current system time. ?Day (date()) : Return the numerical day of the month or the given date expression. Example: Store {03/10/75) birthDate . The birthday along with other command. ?Month (date()): Return the numeric month for the given date. ?Year (date()) : Returns the numeric year of the given date. ?Dow (date()): Return the numeric day of the week for
  • 3. given date. ?Cdow (date()): Return the character day of the week for given date. ?Dtoc 0 : will convert Date type variable to character type. We cannot find day, month of variable which is of character type. ?CtoD (): Converts a character expression or variable to a date related function to Cow, month on when a character expression is converted to date expression. Eg. Store CtoD to vdate. DATABASE FUCTION : Create : Creates a new database file create Employees.dbf. Use Emplyoees.Dbf: Use command opened the database file and it's associated in. Close all: - Closes all open databases, index file etc. Append - use for adding records in a database. First open database with USE command then appends records in it. Modify structure: - Allows adding new or deleting of in database field. Display structure: - Display the structure of database. Rename <filel> to<file2>: Renames the name of <filel>to<file2> Edit - Allows the user to edit or modify record. Replace: - Replace command replaces the field with mentioned text or values. Syntax:- Replace all bonus with 7500 for Designation "officer "
  • 4. You can also use. And. . or. clause for applying two or more condition for query record. LIST AND DISPLAY FUCTION (a) List: - Display the entire record list. (b) List all: - Same as list command. (c) List off: - Will list the records without displaying the record numbers. (d) List for name="s" Example. List for salary>2500 .and. salary<4750 (e) List Code, Surname, Firstname, Salary, Doj for Doj>={01/04/1998} (f) List to printer (g) You can use. And., Or. Clauses with list for applying two or more conditions. (h) List next next 3 I) Display: used for displaying a record. II) Display all: Displays all the records but screen at a time. List commands does the same function but the records simply scroll upward on the screen if all the records do not fit on the screen. Ill) Display Memory: - Display the current contents of memory variables and arrays. MOVING TO RECORDS Go/Goto<recordno>: Positions the record pointer on the specified record number in dbf. Eg.: Goto 16 Go top: Position the record pointer on the first record of the database.
  • 5. Go bottom: Position the record pointer on the last record of the database. Skip: Positions the record pointer on the next record from the present record. Try Skip+5 and also Skip -3 while status is on. A database should be used or open, and observe which record becomes your present record. BROWSING THE RECORDS Browse: Browse for NAME="s" Browse fields NAME, SALARY, DESIGNATION Browse nomodify, nodelete, noappend: Browse the records but you can not modify them or delete them or add more records to your database. DELETING RECORDS Delete: delete the record on which your record pointer is positioned. Delete for: Used for deleting records which match the conditions specified, e.g. Delete for dateofjoin>{01/01/1969} Recall: - Unmarks the records, which is marked for deletion. Only unmark the record if the record pointer is positioned on the deleted record. Pack: Permanently removes the record marked for deletion. Once records are packed they cannot be Recalled. Zap: The use of this single command permanently deletes all the records of the entire database. Deleted (): this command along with list command will display only records, which are marked for deleted. Syntax: list for deleted().
  • 6. SPECIAL FUCTIONS: Note: A database has to be opened for working with the following commands. ? Fcount ()- Returns the number of fields in an open database. ? Recsize Q-Display the size of the records. ? RecnoQ- Displays the current record number. ? Reccount()-Counts the number of records in a database file. ? Reccount()-Counts the number of records in a database file. ? Count- can be used for counting records, which match a criteria. E.g. Count for Salary>4500 ? Int (<expN>)- Returns a Integer portion of a numeric expression. ? Len (<expN>) - Returns the number of characters in a character expression. ?Abs(<expN>)-Retum the absolute value of the specified numeric expression. ? Right (Vname2): Returns the specified number of rightmost characters from a character string. ? Left (<expN>)- Return a specified numeric of character expression starting with the leftmost character. ? Replicate ("*", 35) -Returns a character string that contains a specified character expression repeated a specified number of times. ?CurDir()- Returns the currents MS-DOS directory. ?Dikspace()- Returns the number of bytes available on the default disk drive. Lower () Returns a specified character
  • 7. expression in lower case letters. ? Upper (): - Returns the specified character expression in upper case letters. TRIM FUCTIONS "xname=Abraham Lincoln" Ltrim():-Returns the specified character expression with leading baink removed. ?Itrim(xname) will remove blank from name. RtrimQ:- Return the specified character expression with trailing blank remove ?rtrim(xname): will remove blank from name. SubstrQ:- Return a specified number o character from the given expression or mem field. Zname="Anthony" ?Substr(zname,l,3) will display only 'ant' ?substr(zname,5,2) will display from character and 2 more characters of the variable Only 'on' will be displayed. ARRANGING RECORDS AND VIEWING THEM IN ASCENDING (A-Z) (0-5) OR DESCENDING (Z-A) ORDRER. RECORDS ENTERED IN THE DATABASE NEED NOT BE IN ORDERED form. But while printing displaying reports, we need to show them in a ordered form so as to give meaning to the reports. Sometimes reports may be needed on alphabetically listing of the Salesman name or on the Data wise bill entries. From one data to another may be required for reporting and extracting information from them.
  • 8. Hence it is of utmost importance that records entered should be arranged so as it arrive to decision-making. FoxPro provides two simple and most efficient ways to arrange the record entered and not only to view them in that form but also to query them so as to quickly search to the user mentioned criteria. These two methods are 1) SORT 2) INDEX. A) SORT: is a mentioned in which the user mentions the field on which he wants the performs the sort and the output is generated and stored in a different target database file contain the sorted output on the fields mentioned in the sort command. You have to open the target database file to view the sorted records. /D is use to sort in a descending order, otherwise it will sort in ascending order.] Syntax: Use <filename> Sort on <field> /D to xfile -/D is used for Sorting in a descending order. Use xfile Browse To sort on more than one field: Use SALES DBF Sort on STATE, CITY to STATE Use STCT.dbf Browse a) INDEX: Index command arrange the record in ascending or descending order but the fundamental different between sort and index is that, with Index command a number of the database which are indexed in Ascending or Descending order. In the sample given below, in the friends' database the field has three names, which are not in alphabetical order. If we index it and store it in the index file name.idx only the record numbers will exist but arranged in such a way that the
  • 9. corresponding names are in alphabetical order. Hence we have to associate out source database (Friends.dbf) with the index file (name.idx) to view the records of the source database in the ordered form. When some more records are added in the source database the index file will have to be build up again can be surd to search records matching particular criteria when the database very huge (e.g. more than 60,000 to 70,000) records. The index file being smaller in size takes less space. OTHER COMMAND Clear all: Clear all the memory variables and activate Windows, menus, popup etc from the memory. Clear : Clear the screen or Active window. Quit: To exit from FoxPro. Be sure to close all open database and other files before quitting. Run or ! (Exclamation marks) - is used or running a MS-DOS command without quitting it. IV) FILE DELETING COMMANDS Delete File <Filename>: Deletes a file from the disk. Erase <File name>: Erases the file from the disk. REPORT AND LABEL REPORT: This command produces reports using report layouts that have been designed earlier. If CONSOL has not been SET OFF, the report is displayed on the screen. They can also be sent to the printer or a text file. Before this command is used, the report form must have been created a saved in a file. The command CREATE REPORT lets you design these report form using the report Layout Window. The default extension for these files FRX. LABEL: This command produces mailing labels for the database file that is open in the currently selected work area if CONSOLE has not been SET OFF, the label at
  • 10. displayed on the screen. They can also be sent to the printer or to a text file. Before this command is used, the label form must have been crated and save in a file. The command CREATE LABEL lets you design these mailing label from using the label layout window. The default extension for this file is LBX. Create a one .dbf file with the help of following field and solve the questions answer. Field Type Width Name Name Character 20 DOJ Date Eng Numeric 3 Hindi Numeric 3 marathi numeric 8 3