Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Problem while connecting to MS Access 2007
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
ruds  
View profile  
 More options Sep 1 2012, 7:04 am
Newsgroups: comp.lang.java.databases
From: ruds <rudra...@gmail.com>
Date: Sat, 1 Sep 2012 04:04:50 -0700 (PDT)
Local: Sat, Sep 1 2012 7:04 am
Subject: Problem while connecting to MS Access 2007
Hi, I'm getting " Data source name not found and no default driver
specified" Error while connecting to MS Access database through
tomcat. I have  created user DSN for my db.
My connection code is:
 Connection con =null;
    try {
        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
        String conStr = "jdbc:odbc:Driver={Microsoft Access Driver
(*.mdb, *.accdb)};DBQ=" +
            "D:\\OLD D DRIVE\\FileManager\\FileManager.mdb";
        con = DriverManager.getConnection(conStr);
    } catch(Exception e) {
        e.printStackTrace();}

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Arne Vajhøj  
View profile  
 More options Sep 1 2012, 10:19 am
Newsgroups: comp.lang.java.databases
From: Arne Vajhøj <a...@vajhoej.dk>
Date: Sat, 01 Sep 2012 10:19:18 -0400
Local: Sat, Sep 1 2012 10:19 am
Subject: Re: Problem while connecting to MS Access 2007
On 9/1/2012 7:04 AM, ruds wrote:

> Hi, I'm getting " Data source name not found and no default driver
> specified" Error while connecting to MS Access database through
> tomcat. I have  created user DSN for my db.
> My connection code is:
>   Connection con =null;
>      try {
>          Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
>          String conStr = "jdbc:odbc:Driver={Microsoft Access Driver
> (*.mdb, *.accdb)};DBQ=" +
>              "D:\\OLD D DRIVE\\FileManager\\FileManager.mdb";
>          con = DriverManager.getConnection(conStr);
>      } catch(Exception e) {
>          e.printStackTrace();}

Pre-2007 it is:
   .mdb files
   {Microsoft Access Driver (*.mdb)} driver

2007 and later is:
   .accdb files
   {Microsoft Access Driver (*.mdb, *.accdb)} driver

Also be sure that you use 32 bit Java as I believe the
ODBC driver is 32 bit.

Arne


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ruds  
View profile  
 More options Sep 3 2012, 1:45 am
Newsgroups: comp.lang.java.databases
From: ruds <rudra...@gmail.com>
Date: Sun, 2 Sep 2012 22:45:40 -0700 (PDT)
Local: Mon, Sep 3 2012 1:45 am
Subject: Re: Problem while connecting to MS Access 2007
My CPU is 64 bit and for creating DSN I'm executing "C:\Windows\SysWOW64\odbcad32.exe". I have installed jdk1.6.0_32 version of java.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Arne Vajhøj  
View profile  
 More options Sep 3 2012, 10:34 pm
Newsgroups: comp.lang.java.databases
From: Arne Vajhøj <a...@vajhoej.dk>
Date: Mon, 03 Sep 2012 22:34:56 -0400
Local: Mon, Sep 3 2012 10:34 pm
Subject: Re: Problem while connecting to MS Access 2007
On 9/3/2012 1:45 AM, ruds wrote:

> My CPU is 64 bit and for creating DSN I'm executing "C:\Windows\SysWOW64\odbcad32.exe". I have installed jdk1.6.0_32 version of java.

32 or 64 bit Java?

Arne


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ruds  
View profile  
 More options Sep 4 2012, 1:02 am
Newsgroups: comp.lang.java.databases
From: ruds <rudra...@gmail.com>
Date: Mon, 3 Sep 2012 22:02:42 -0700 (PDT)
Local: Tues, Sep 4 2012 1:02 am
Subject: Re: Problem while connecting to MS Access 2007
I had downloaded the exe file for i586 so ithink it is 32 bit.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Roedy Green  
View profile  
 More options Sep 6 2012, 7:22 pm
Newsgroups: comp.lang.java.databases
From: Roedy Green <see_webs...@mindprod.com.invalid>
Date: Thu, 06 Sep 2012 16:22:13 -0700
Local: Thurs, Sep 6 2012 7:22 pm
Subject: Re: Problem while connecting to MS Access 2007
On Sat, 1 Sep 2012 04:04:50 -0700 (PDT), ruds <rudra...@gmail.com>
wrote, quoted or indirectly quoted someone who said :

>Hi, I'm getting " Data source name not found and no default driver
>specified" Error while connecting to MS Access database through
>tomcat. I have  created user DSN for my db.

see http://mindprod.com/jgloss/jdbc.html

--
Roedy Green Canadian Mind Products http://mindprod.com
A new scientific truth does not triumph by convincing its opponents and making them see the light,
but rather because its opponents eventually die, and a new generation grows up that is familiar with it.
~ Max Planck 1858-04-23 1947-10-04


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Arne Vajhøj  
View profile  
 More options Sep 6 2012, 8:41 pm
Newsgroups: comp.lang.java.databases
From: Arne Vajhøj <a...@vajhoej.dk>
Date: Thu, 06 Sep 2012 20:41:41 -0400
Local: Thurs, Sep 6 2012 8:41 pm
Subject: Re: Problem while connecting to MS Access 2007
On 9/4/2012 1:02 AM, ruds wrote:

> I had downloaded the exe file for i586 so ithink it is 32 bit.

So 32 bit Java and 32 bit ODBC.

And Access must be 32 bit as well as I don't believe a 64 bit version
exists.

Mysterious.

Can you access it via DSN?

Arne


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ruds  
View profile  
 More options Sep 6 2012, 11:32 pm
Newsgroups: comp.lang.java.databases
From: ruds <rudra...@gmail.com>
Date: Thu, 6 Sep 2012 20:32:23 -0700 (PDT)
Local: Thurs, Sep 6 2012 11:32 pm
Subject: Re: Problem while connecting to MS Access 2007
yes I'm able to open it and view the contents. Is it required to have a META-INF/context.xml file? would that be a problem?

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Arne Vajhøj  
View profile  
 More options Sep 8 2012, 6:01 pm
Newsgroups: comp.lang.java.databases
From: Arne Vajhøj <a...@vajhoej.dk>
Date: Sat, 08 Sep 2012 18:01:23 -0400
Local: Sat, Sep 8 2012 6:01 pm
Subject: Re: Problem while connecting to MS Access 2007
On 9/6/2012 11:32 PM, ruds wrote:

> yes I'm able to open it and view the contents.

I meant - can you access it from Java using the DSN?

> Is it required to have a META-INF/context.xml file? would that be a problem?

That is configuration for Tomcat. Including defining data sources.

It is not needed when using DriverManager.

Arne

PS: Using an Access database from a web application usually gives
     problems as Access is not designed for that type of context.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »