Here another most simple program.
There are following simple steps to do:
- To connect ms access with your program (of java) you need to create a database in ms access and then create a table in it. make sure that table name and database are different. so that you will not have confusion.
- Save the table and then database.
- Go to control panel.
- Go to Administrative Tools
- Click on Data Sources(ODBC)
- On User DSN(Data Source Name) tab you can easily see the MS Access Database in User Data Sources.
- Select the MS Access Database and click on configure (there will be ODBC Microsoft Access Setup open)
- Specify Data Source Name in Text field. The Description field is optional and you can leave it blank.
- In Database grid click on "select" and then go to path where database file is saved that was created by you.
- After this. Click on "Advanced " button and then specify a log in name and password and then click OK
- On System Database grid. click on none. and its done!! tadaaaaaaaa
I made an "employee" name database in MS Access and "emptable" named table which I am using here.
take a look at this.
This is the sample program that i had used for showing the database connectivity for a java program with Microsoft access.