Learn programming language

Using access database with Java (Step by Step Guide)

The step by step of how to use access database with Java

Java database connectivity with ms access is another way to learn how to connect ms access database in Java using eclipse. Knowing how to connect ms access database in java 8 or java ms access connectivity steps is what am about to explain in this article. Today let look into how to connect access database with java.

Step one:

Creating an access database either in mdb (2002-2003 format) or accdb (2007). Any of this two will work out what we want to do. Save it inside your java project folder (note: it can be anywhere but for easy accessibility it might be good you save it inside your project folder.)

Step two:

Click on your windows start button and locate control panel then click on it. Ok

Step three:

Change your view by option to large icons. You can find this on your top right menu on control panel

Step Four

Click on administrative tools among the listed option or search for it

Step Five:

A popup window comes up and then clicks on Data Sources (ODBC)

Step Six

On your user DSN tab double click on add button. (These add your database to odbc).

Note: Its possible you encounter an error while trying to add your access db, don’t worry. This error happens when odbc can’t locate your MS office driver but there is a way around it.

Go to Local disk (C) and click on windows then double click on this exe file (odbcad32.exe) C:\windows\sysWOW64/odbcad32.exe This exe will load ODBC for you then follow these steps in adding your MS access database. Don’t forget you must login to your system as an administrator.

Step Seven

Click on select button and a window comes up where you will find on your right hand side how to navigate to where your access database is. When you find it just click on it and click ok. Ensure you give it a data source name and description.

Repeat the same process for the next tab called System DSN. I love doing it for the two tabs though one is needed huh.

Recommended: How to use access database with c#

Bolarinwa Olajire

A tutor with demonstrated history of working in the education industry. Skilled in analytical skills. Strong education professional with a M. SC focused in condensed matter.

Leave a Reply

Your email address will not be published.

Back to top button