Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 442
  • Last Modified:

Why won't my java program run on this new machine???

Hi -

I have an application written java which connects to an access database and runs perfectly well on at least 2 other machines.

However, I have a new machine, and the software doesn't work - giving the following error msg:

Exception in thread "main" java.lang.RuntimeException: Couldn't establish connection with "jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=c:\users\dave\documents\modellingprojects\distributedtraining\livedataset.accdb;READONLY=false" for login "null"

This new machine has pretty much the same configuration, although it it did come pre-installed with Windows 7 home which I haven't changed.

Everything (as far as I can tell) is 64 bit.

Any ideas on what is going wrong? I not really a programmer / IT expert so am at a complete loss!! Your help will be greatly appreciated!!
0
INeedTechnicalSupport
Asked:
INeedTechnicalSupport
  • 4
  • 3
1 Solution
 
PatHartmanCommented:
Does the new PC have Access installed?  If it doesn't, you will need to install the ODBC driver separately.

Technically you are not using MS Access at all so you don't actually need Access installed.  You are using Jet which is a separate product.  It used to be installed with Windows but may not be any longer.

Also, I can't tell what version of Access was used to create the .mdb.  MS has dropped support for databases in the A97 format as of Access 2013 so that is a potential issue.
0
 
CEHJCommented:
Do yourself a favour: use a portable and open Java db, such as Derby or HSQL db.
0
 
INeedTechnicalSupportAuthor Commented:
Thanks Pat - Its a database originally created in access 2010  - and yes I do have access installed on this machine, although its the 2013.

However, I have a similar configuration on another machines and it works fine on that one - although maybe that had a previous version of access 2010 before it was upgraded (i can't remember). Could that be an issue? How would I install the ODBC driver separately? I'm wondering if its a 32bit Vs 64bit issue.

And CEHJ - I'm constrained by a client so, unfortunately, it has to be ms access :-(
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
PatHartmanCommented:
Why is it an .mdb if you created it with A2010?

The 64-bit version of Office is not compatible with the 32-bit version.  Since the database is data only, it shouldn't be a problem but you may have a conflict with Java and 64-bit drivers.  You should probably be posting in a Java forum.  As I mentioned earlier, this is not an "Access" problem.  You are not using Access at all.  You are using Jet (.mdb) or ACE (.accdb).
0
 
INeedTechnicalSupportAuthor Commented:
I thought i was posting in a java forum!
It certainly one of the topics I selected...first time using experts exchange - so forgive my mistakes...
0
 
PatHartmanCommented:
Sorry, you are correct.  I got to it from an Access forum and didn't check the topic so it is my mistake not yours.  I don't know anything about Java except that I like drinking it:)
0
 
INeedTechnicalSupportAuthor Commented:
okay - I am a numpty and have now found my problem!!
I'd accidentally installed a 32 bit version of the development tool (AnyLogic) I was using - which is clearly not going to like 64bit ODBC!!

Sorry and thanks for the help!!
0
 
INeedTechnicalSupportAuthor Commented:
I was being a numpty!!
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now