Skip to main content
Home
Live to Learn!

Main navigation

  • Home
  • Learn
    • FoxPro
    • MS-DOS
    • C PRG
    • Java
    • ASP
    • Ruby on Rails
    • ASP.NET
    • E-Books
    • Exam Preparation
    • Tools
  • Blog
  • Forums
  • Contact
User account menu
  • Log in

Breadcrumb

  1. Home
  2. FoxPro Programming

FoxPro Commands - Part 1

Book navigation

  • FoxPro Commands - Part 1
  • Foxpro commands - Part 2
  • Data Types in FoxPro
  • Numeric Functions in FoxPro
  • Creating a Program
  • Input and Output Statements in Foxpro
  • Control Structures in Foxpro
  • Creating menu in Foxpro for DOS
  • Simple Journal Entry program
  • Simple Ledger creation & Posting Program
  • Trial Balance Program
  • Balance Sheet Program
  • Simple Weekly Calendar Generation
  • How to install FoxPro 2.6 in Windows 10 / Windows 8 / Windows 7?
  • How to install FoxPro 2.6 on Linux OS (Ubuntu 20.04 | 20.10 | 21.04)?
  • How to install FoxPro in Windows 10 64 bit using VDosPlus?
By Karthikeyan , 28 September, 2009

FoxPro 2.6 for MS-DOS / Windows - Basic Commands

  • FoxPro is SEMI-RDBMS
  • Unlike other RDBMS systems, in FoxPro each database can contain only one table.
  • Hence, the single table is called as database in this tutorial

foxpro front screen

In FoxPro, first four characters of any command is enough to execute

For e.g.:- crea ==> create

1. TO OPEN A DATABASE:

        Syn:

                use <dbname>

        Ex:

                use book

2.TO CLOSE THE DATABASE:

         Use

               To close the current opened database.

        Close all

               To close the all opened database.

3. To CREATE NEW DATABASE:

Syn:
                crea <dbname>   

                create <dbname>

Ex:

                crea book

 

Foxpro create db

4. To Modify Structure of the Database:

        Modify structure

                        (Or)

            Modi stru

5. To add new records in database

 Append is used to add the new record.

Syn:

          append

                       [Blank]

                       [From <dbname>]

Ex

Append  
Append Blank
- To add blank records.
Append from first.dbf
- To add the records from FIRST.DBF to SECOND.DBF
- Same Structure is required for these databases

 

6. To display the records in the current database 

 Used to display the particular record.

 Syn:

  Display

              [All]

              [Structure]

              [Status]

              [Memory]

Ex:

Display      
Display All          
Display All Records in page wise.

7. To Display the structure of the database:

Display Structure     

8. To display the status of the set commands:

Display Status

9. To display the status of the system memory variables.

Display Memory

10. To view the status bar

Set stat on

11. To edit records

EDIT

- It list all the records one by one for editing.

Any one of the record can be edited using 'FOR' as below

EDIT FOR empname = "LEELA"

EDIT FOR rollno = 103

 

12. To delete records

DELETE

- To delete current record

DELETE NEXT 4

- To delete next 4 records

After using the delete command the records marked with * (asterisk) mark, i.e., marked for deletion.

RECALL

- It is used to recover the deleted records.

e.g. RECALL

RECALL NEXT 4

PACK

- To delete the records permanently. It is used after the delete command.

BLANK

- It can be used to empty the record instead of deleting.

13. To delete all the records in the current database

ZAP

 

  • Add new comment
Tags
Foxpro Basic Commands
Foxpro 2.6
Foxpro Tutorial for beginners

Comments20

Pankaj Rathi (not verified)

6 years ago

I learned FoxPro when I was in Class 6. Feeling Nostalgia!

Profile picture for user Karthikeyan

Karthikeyan

6 years 6 months ago

In reply to by Deep (not verified)

Make sure no space in folder or file name. Do not use depth directory structure. Reduce the file or folder name to 10 chars or less.

Deep (not verified)

6 years 6 months ago

Mr Karthikeyan, I have copied one particular directory which has some database folders to a system running win 10. I'm using VM to run Foxpro. I'm unable to locate one of the directory from Foxpro but the directory exists when I look from Windows Explorer. How to select that directory in Foxpro. Can you help please ?

Haris Dojki (not verified)

8 years 11 months ago

Sir I want to sequence (Re numbering voucher number) date with vcno in forpro how to squence it with command in foxpro 2.6a. I really stress with this. Plz help me.

Profile picture for user Karthikeyan

Karthikeyan

9 years 1 month ago

In reply to by Akash1000 (not verified)

'Use' command without specifying any database name closes the current database connection.

Akash1000 (not verified)

9 years 1 month ago

My small doubt, as you mentioned command to close current database the command should be "clos db" instead of use. Pls tell me if I am wrong, i was just doubting it.

Anwer Nathani (not verified)

9 years 10 months ago

i want the dwanlod foxpro progrimnig

muthu kumaran (not verified)

10 years 2 months ago

i want help to foxpro open in windows 7-64bit.

Yogesh Jadhav (not verified)

11 years 3 months ago

can I get number of Karthik Sir

Profile picture for user Karthikeyan

Karthikeyan

12 years 1 month ago

In reply to by jacz (not verified)

Please ask the question in forums with detailed information.

jacz (not verified)

12 years 1 month ago

Hi Karthik,
How we can solve the trial balance difference, even though all vouchers are listed properly...

M.Bilal Arshed (not verified)

12 years 1 month ago

i want to know about foxpro.plz help me ........................

Profile picture for user Karthikeyan

Karthikeyan

12 years 2 months ago

In reply to by ArunShah

Ya sure, open a new question in forums and describe your problem in detail. I'll help you.

Profile picture for user ArunShah

ArunShah

12 years 2 months ago

In reply to by Karthikeyan

actually i have some data base.. and i want some query.. its in dbf format will, you pls help me how to gather query from data base.

Profile picture for user Karthikeyan

Karthikeyan

12 years 2 months ago

In reply to by ArunShah

Download from the below link, and see the readme file for installation instructions. if you have any problem in install let me know. https://www.box.com/s/zad72...

Profile picture for user ArunShah

ArunShah

12 years 2 months ago

i want to learn foxpro... and pls help me to install foxpro in my win7 system..

Profile picture for user Divya

Divya

12 years 4 months ago

Happy Diwali to All

ms anuraj (not verified)

12 years 5 months ago

exellent

Profile picture for user Karthikeyan

Karthikeyan

12 years 9 months ago

In reply to by RAMYAKUMAR (not verified)

It was posted while we were…

It was posted while we were studying B.C.A., you have missed it.. :-)

RAMYAKUMAR (not verified)

12 years 9 months ago

 I am able to recollect my UG foxpro now only.very nice post by you.

Featured Blog Posts

Convert Currency in Number to Words (Indian Rupees) - MS Excel
Foxpro Tutorial and Programs
Convert Currency in Number to Words in MS Word
Convert Currency in Number to Words (Indian Rupees) - Version 2
Best way to Use Rupee Symbol in Windows – Easy steps
Convert Currency in Number to Words - MS Access
Creating All in One Windows XP DVD with all Important Applications
RSS feed

© 2009-2025 Live to Learn.In

Terms of Use | Privacy Policy