First, create an access database file i.e filename.mdb.
Following are the steps to create a database file:
Choose Start, Programs, Microsoft Access. This will display a screen as shown Diagram 22.1.
Choose the option 'Blank Database', since a new database file needs to be created. Then click on the 'OK', button, this will display a screen as shown Diagram 22.2
Give the name of the database file as 'Student' and also specify the path where the file has to be saved. This will create a database file called 'Student.mdb'.
To create table within the database file 'Student.mdb', click on the option Table. This will display a screen as shown in below Diagram 22.4
Now, double click on the option 'Create table in Design view'. This will display a screen as shown in below diagram 22.5.
Specify the structure of the table to be created as shown in below diagram 22.6.
Specify the Primary Key if needed by clicking on the file name and the 'Key' by right clicking on 'Stu_RollNo' Column.
Save the table as 'StudentTable'.
The Table 'StudentTable' has been created within the database file 'Student.mdb'.
To add few Test records, double click on 'StudentTable', and then fill redcords. This will display screen as shown in below diagram 22.10.
JDBC - Programming:
JDBC - Working With User Interfaces - Using Swing Compoents
No comments:
Post a Comment