Hasanur
Hasanur

Reputation: 146

Deploy Java Desktop Application with MS Access DB

This is the first time I am going to deploy the Java Desktop Application with MS Access DB and discovered JAR package is not getting database access other then my development PC though I had the MS access DB in the same directory of the JAR file I have copied after Build the application. And I understand that I cannot connect MS access DB I created with ODBC connection of my PC. Now my question is

How can I deploy Java Desktop Application with MS access BD which will run in any computer where manual ODBC connection to the MS ACCESS DB for every computer will not require ?

I am not trying to connect MS access DB within a net work rather I am trying run this app where MS Access DB is already installed and my supplied DB will be with the JAR file and I want to access the DB I have provided from Java Front End Application.

Please help.

Upvotes: 0

Views: 1323

Answers (1)

Kamil
Kamil

Reputation: 13931

First you should get ODBC driver for Access database. Some computers may don't have it.

After you install that driver you should create ODBC Data Source on computer. I have no idea how to do it in Java, but ODBC Data Source configurations are stored in registry and you can add your Data Source.

Google "registry add odbc data source" or "Can I Create and Delete a DSN Using a Script" (second one is title of good article i found.

Probably you can access registry from java without any problems.

You can also use one of install-maker programs. Some of them have something like "Add Data Source" functionality.

Upvotes: 1

Related Questions