Re: getConnection to MS ACCESS problem

From: Leon Bullock (leon_at_bullock1.freeserve.co.uk)
Date: 07/15/04

  • Next message: IchBin: "Re: Java conneciont string question..."
    Date: Thu, 15 Jul 2004 16:59:17 +0100
    
    

    "Avraham" <niv444@walla.co.il> wrote in message
    news:8b9f0d07.0403300224.2e768c18@posting.google.com...
    > 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.

    Sorry for a late reply, I just joined the group.

    Sounds like the ODBC is not set up correctly - this is a quote from the
    windows help

    =====================
    To connect to these data sources, you must do the following:

      a.. Install the appropriate ODBC driver on the computer that contains the
    data source.

      b.. Define a data source name (DSN) by using either the ODBC Data Source
    Administrator to store the connection information in the Windows registry or
    a DSN file, or a connect string in Visual Basic code to pass the connection
    information directly to the ODBC Driver Manager.
    =====================

    >
    > -----------------------------------------
    >
    > 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


  • Next message: IchBin: "Re: Java conneciont string question..."

    Relevant Pages

    • Re: Quick Q.
      ... incompatible with this version of windows. ... > Usually MDAC is listed as a download in the MS XP update. ... > Desktop Database ODBC Drivers, or the Visual FoxPro ODBC Driver." ...
      (microsoft.public.windowsmedia.sdk)
    • Visual FoxPro 64-Bit Driver
      ... Does this driver work if so how do i get it, i have a VFoxpro database that I need to connect to with SQL on a Windows 2008 Server 64-bit version. ... we have a 64-bit version of our ODBC driver that is compatiblewith VFP 9 ...
      (microsoft.public.fox.helpwanted)
    • Re: Database connectivity
      ... mxODBC works on Windows, Linux and quite a few other platforms. ... Apart from mxODBC you will need an ODBC driver that allows ... you to connect to the database. ...
      (comp.lang.python)
    • 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)