#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2007
    Location
    Portugal
    Posts
    38
    Rep Power
    9

    Connect into Access Database


    I've been reading a lot of things, and i would like your help about this.

    Some say that the connection can be done without the DSN, and i would like to do that, but I'm not being able to make the connection to the database i want.

    And the problems starts here:

    Code:
    Connection conn = DriverManager.getConnection( "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\\Users\\Don Shinchan\\Documents\\Database1.mdb" );
    The path is correct, and the database name is Database1 (i was testing).
    And i get a null connection so something is wrong just don't know what, can someone help me out?
  2. #2
  3. Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Aug 2010
    Location
    Eastern Florida
    Posts
    3,719
    Rep Power
    348
    Is the URL passed to getConnection() correct? Where did you get the URL you are trying to use?
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2007
    Location
    Portugal
    Posts
    38
    Rep Power
    9
    My own computer path to the database...

IMN logo majestic logo threadwatch logo seochat tools logo