Вы находитесь на странице: 1из 3

EXERCISE # 9

Objectives : 1. To understand and provide command to open one or more tables. 2. To understand how index file help us in organizing data and to create and assign it

Instruction:
1. Open your VFP9 Application 2. Set to your work drive where your data is located. Set defa to d:\payroll\data 3. Open the following table and browse to check you data. Employee , SSS , Philhealth and Wtax How to do this: On the command box type the following Use employee Browse (after the records are display , press CTRL W to save it, then do the rest, you will Observe on the status bar, which is located at the lower portion of the screen Will display the tables and number of records in it) 4. In order to open as many tables and use it one at a time , we will use the command Select and assign a letter or number (a-j and 1 to 9) prior to opening the table. Select 1 Use employee Select 2 Use sss Select 3 Use philhealth Sele 4 Use wtax To verify the tables are open , type sele 2 then browse and check the sss table is display, try to use the other selected tables. Note : If a table is open without select and another table is open after that the first table will be close. While using select it will allow to open many tables and will be close only by giving the command close data. 5. An indexed file is a computer file with an index that allows easy random access to any record given
its file key

An index file is dependent on the table and the keys refers to field name. How to create an index file ? Open a table first Use Employee Select the field you want to arrange and a Index on firstname to fname filename to assign as index file Index on lastname to lname Once an index file is created it is already active How to close an index file Set index to How to open tables and index files Use employee index fname,lname

6. Based on our exercises creating forms, Employee, SSS, Philhealth , Wtax and Payroll, we will remove the tables install via database environment for example on employee forms. a. Right click on the forms and select data environment Click on the employee table and press del to delete, once it is deleted there will be a program error due to no table are available for use. Inorder to solve this, double click on any part of the forms . until you see object [Forms] and Procedure [Load] type the following command: b. Pls Indicate the exercise item number that Close data you have difficulty to understand. Select 1 Use employee Index on firstname to fname Index on lastname to lname Index on empid to empid Set index to fname,lname,empid C. Open SSS Forms, follow step a and on step b it is: Select 2 Use SSS Index on salary1 to sal1 D. Open Philhealth forms follow step a and step b it is Select 3 Use Philhealth Index on salary1 to psal1 E. Open wtac forms follow step a and step b it is Select 4 Use wtax Index on taxcode to wtax F. Open Payroll forms, follow step a and on step b it is Close data Select 1 Use employee index fname,lname.empid Select 2 Use sss inde sal1 Select 3 Use philhealth index psal1 Select 4 Use wtax index wtax Select 5 Use payroll Rerun all forms and check if it works!
How would you rate yourself in this exercises: 1- I dont understand at all 2- I understand a little 3- I need somebody to assist me inorder to understand 4- I understand fully

Please give your comments:

B.

Вам также может понравиться