VISUAL BASIC_6
 

12.  Database Projects


Adding an Index:

We will set the empno field as the primary and unique field.  Right-click on the employee table and select the ‘Design’ option from the menu.   Click the ‘Add Index’ button.   A window titled ‘Add Index to employee’ will appear as shown in the figure 6.

Enter  empno into the Name field.   Select empno from the “available Fields’ list box.   Check the Primary and the Unique boxes.  Click OK to add the primary key index.   Click close.   The Database window will display the fields and the indexed field  as in the figure 7.


                                       Figure 6

 
                             Figure 7

Adding Data:

Right-click on the employee table, but this time select ‘Open’.   You will get the data entry window as shown in the figure 8.

To add a record click Add and then fill the four fields with appropriate data.   When you have filled in the data for the first record, click ‘Update’ to save the first record and clear the fields for the next set of values.   Click Add again to add the next record.   Continue until you have created some 5 records.   Now you have created a sample database for further experimentation.

 
                                    Figure 8


 

Copyright © 2001 Selfonline-Education. All rights reserved.