getConnection to MS ACCESS problem

From: Avraham (niv444_at_walla.co.il)
Date: 03/30/04


Date: 30 Mar 2004 02:24:00 -0800

Hello,

getConnection problem.

I run this on windows XP. I have MS ACCESS
database working well.

The problem is with trying to connect to the database (?).
The database does exist.

-----------------------------------------

import java.sql.*;
import sun.jdbc.odbc.*;

public class Test {
        public static void main(String[] args) {
try{
 Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
 }catch(java.lang.ClassNotFoundException e){
         System.err.println("ClassNotFoundException: ");
         System.err.println(e.getMessage());
         }
                                 
String url="jdbc:odbc:ADDRBOOK";

try{
   Connection con = DriverManager.getConnection(url,"","");
 }catch(SQLException ex){
         System.err.println("SQLException: ");
         System.err.println(ex.getMessage());
         }
        }
}

-----------------------------------------
Here is what I get ( ignore the Hebrew characters..I can not read it
on my XP anyway)

SQLException:
[Microsoft][ODBC Driver Manager]
 ???? ???° ??·???? ?? ??÷? ??? ÷??? ???? ?·?? ??
???? ?°?°· ????
Press any key to continue...

--------------------------------
The first "try" does not throw an exception.
The second "try" does, why ? what should I do ?

Please help.
Thanks, Niv



Relevant Pages

  • Re: getConnection to MS ACCESS problem
    ... > getConnection problem. ... > I run this on windows XP. ... > The problem is with trying to connect to the database. ... Install the appropriate ODBC driver on the computer that contains the ...
    (comp.lang.java.databases)
  • Re: getConnection to MS ACCESS problem
    ... > getConnection problem. ... > I run this on windows XP. ... > database working well. ... > The problem is with trying to connect to the database. ...
    (comp.lang.java.databases)
  • Re: getConnection to MS ACCESS problem
    ... > getConnection problem. ... > I run this on windows XP. ... > database working well. ... > The problem is with trying to connect to the database. ...
    (comp.lang.java.databases)
  • SourceForge.net Sitewide Update: Jan 26th, 2005 (fwd)
    ... I just returned from an enjoyable Open Source conference in Hawaii ... open sourced the database under the name Derby. ... The CVS client SF.net staff recommend for MS Windows users is ... priority technical support. ...
    (comp.os.linux.announce)
  • Re: Is this possible??
    ... I understand Windows security but since I've not seen A2007 live, ... The backend is on the server in it's own file. ... database, but everyone does not need to have access to tblwage which is ...
    (microsoft.public.access.tablesdbdesign)