Microsoft Visual FoxPro 6.0 Database Table

Microsoft Visual FoxPro 6.0 Database Table (.dbf)

How to Create Database Table

STARTàAll ProgramsàMicrosoft Visual Studio 6.0àMicrosoft Visual FoxPro 6.0

Write in Command Window

            CREATE SCHOOL <ENTER>

1. Create the following table.

            Field Name                 Data Type               Width                          Dec

            studroll                        Numeric                      3                                 

            studname                    Character                  20

            dob                              Date                            8

            beng                            Numeric                      2

            engb                            Numeric                      2

            hist                              Numeric                      2

            geog                             Numeric                      2

            comp                            Numeric                      2

            total                              Numeric                      3

            aveg                             Numeric                      5                                  2

            grade                            Character                    4

[Use Tab key to go another box also create another label.]

Click OK

Click No

[If you want to Input Data Record click Yes, otherwise No.]

2. Change the date settings to DD/MM/YYYY format.

Write in Command Window

SET DATE BRITISH <ENTER>

3. Input the following date.

Write in Command Window

APPEND <ENTER>

STUDNAMEDOBBENGENGBHISTGEOGCOMP
ANUP MISTRI05-02-19925645637880
TAPAN PAL24-06-19906367857870
SUSMITA DAS21-02-19915645756575
RIMPA DAS12-02-19925648687058

After type all record close that window and saw status bar at the bottom of the screen.

4. List the Records.

Write in Command Window

LIST <ENTER>

[Show all record in background window.]

5. Clear the screen.

Write in Command Window

CLEAR <ENTER>

[Clear the background screen.]

6. Goto record no. 3, change the STUDNAME to SUNITA MITRA and HIST to 57.

Write in Command Window

GOTO 3 <ENTER> or 3 <ENTER>

REPLACE STUDNAME WITH “SUNITA MITRA” <ENTER>

REPLACE HIST WITH 57 <ENTER>

7. List the Records showing STUDROLL,STUDNAME,DOB,BENG,ENGB,HIST,GEOG,COMP.

Write in Command Window

LIST STUDROLL,STUDNAME,DOB,BENG,ENGB,HIST,GEOG,COMP <ENTER>

[Show all record of that specific field.]

8. Display record number 4.

Write in Command Window

GOTO 4 <ENTER> or 4 <ENTER>

DISPLAY <ENTER>

[Show only record of 4.]

9. Insert the following record next of 3.

Write in Command Window

GOTO 3 <ENTER> or 3working

INSERT <ENTER>

STUDROLL   STUDNAME              DOB          BENG ENGB HIST   GEOG COMP

         4        BIMAL KAR             04/06/1990      36      75        40        35        50

10. Display all the records.

Write in Command Window

DISPLAY ALL <ENTER>

11. Modify the structure to insert a Character field name GURDNAME having a Width of 20 before DOB.

Write in Command Window

MODIFY STRUCTURE <ENTER>

(1) Click dob

(2)Click Insert

(3)Edit that field with the given information.

(4)Click OK

Click Yes

12. Browse the Database and Edit the records in the following.

Write in Command Window

BROWSE <ENTER>

Write all information one by one as you known.

            STUDROLL               GURDNAME

            1                                  MANAJ MISTRI

             2                                  PRADIP PAL

             3                                  SUKUMAR MITRA

             4                                  BISHNU KAR

             5                                  RATAN DAS

[Don’t close that screen back to command window.]

13. Calculate Total and Average of all records.

Write in Command Window

REPLACE ALL TOTAL WITH BENG+ENGB+HIST+GEOG+COMP <ENTER>

REPLACE ALL AVEG WITH TOTAL/5 <ENTER>

14. Replace Grade with “PASS” where AVEG>=40, Otherwise “FAIL”.

Write in Command Window

REPLACE ALL GRADE WITH “PASS” FOR AVEG>=40 <ENTER>

REPLACE ALL GRADE WITH “FAIL” FOR AVEG<40 <ENTER>

15. List the Records.

Write in Command Window

LIST <ENTER>

[Then clear the background. CLEAR <ENTER>]

16.  Goto the first record in one shot.

Write in Command Window

GOTO TOP <ENTER>

[Show the status bar.]

17. Goto the last record in one shot.

Write in Command Window

GOTO BOTTOM <ENTER>

[Show the status bar.]

18. Display records where BENG=56.

Write in Command Window

DISPLAY FOR BENG=56 <ENTER>

LIST FOR BENG=56 <ENTER>

BROWSE FOR BENG=56 <ENTER>

[Show the result on background screen and browse window.]

19. Delete record number 2and 4 temporary.

Write in Command Window

GOTO 2 <ENTER> or 2 <ENTER>

DELETE <ENTER>

GOTO 4 <ENTER> or 4 <ENTER>

DELETE <ENTER>

[This command uses for temporary delete that record.]

20. Recall record no. 4.

Write in Command Window

GOTO 4 <ENTER> or 4 <ENTER>

RECALL <ENTER>

21. Permanently delete that entire temporary deleted record.

Write in Command Window

PACK <ENTER>

[This command use for permanently delete that entire temporary deleted record.]

22. Count all field names, Records and show field name of 5.

Write in Command Window

?FCOUNT() <ENTER>                       Will Display : 12

[How many field name in database file this function help to count them. Here ?means Print.]

?RECCOUNT() <ENTER>                  Will Display : 4

[How many record in database file this function help to count them. Here ?means Print.]

?FIELD(5) <ENTER>                          Will Display : BENG

[These functions help to find field name. Here ?means Print.]

23 Delete all records.

Write in Command Window

ZAP <ENTER>

[IF Yes all record of data delete permanently.]

6 Replies to “Microsoft Visual FoxPro 6.0 Database Table”

  1. I wish to show some thanks to this writer just for bailing me out of this type of crisis. Because of looking out through the the net and getting things which are not helpful, I assumed my life was gone. Living devoid of the strategies to the difficulties you have resolved through the report is a crucial case, and the kind which might have in a wrong way affected my entire career if I had not discovered your web blog. The ability and kindness in touching all the stuff was very helpful. I am not sure what I would have done if I had not come across such a subject like this. It’s possible to at this point look forward to my future. Thanks for your time so much for your professional and amazing help. I will not think twice to endorse the blog to anyone who ought to have assistance on this matter.

  2. I simply had to appreciate you yet again. I’m not certain the things that I might have handled without those tricks contributed by you relating to this industry. It was actually an absolute daunting problem in my view, however , noticing a professional avenue you dealt with it took me to weep for happiness. I’m just grateful for this guidance and even trust you recognize what a great job you are carrying out instructing many people via a web site. Probably you haven’t come across any of us.

  3. Thank you a lot for providing individuals with remarkably pleasant chance to read critical reviews from this website. It is usually very lovely plus packed with amusement for me personally and my office acquaintances to visit your website at a minimum 3 times per week to find out the fresh secrets you will have. Not to mention, I’m so usually happy for the good hints you give. Selected two facts in this post are truly the simplest I’ve had.

  4. I precisely wished to thank you so much all over again. I’m not certain the things that I might have tried without those solutions documented by you concerning my question. It has been an absolute frightful condition for me personally, however , spending time with the specialised form you treated that took me to cry with contentment. I’m just happier for this assistance and as well , hope you know what a great job you happen to be putting in training many people all through your web page. I know that you haven’t got to know any of us.

Leave a Reply

Your email address will not be published. Required fields are marked *