Results 1 to 2 of 2
  1. #1
    bbq
    bbq is offline Senior Member
    Join Date
    Jun 2007
    Posts
    132
    Rep Power
    0

    Default connect to microsoft access

    I want to connect my java application with access data base, I run java in linux.

    Java Code:
    Class.forName("sun.jdbc.JdbcOdbcDriver");
    DriverManager.getConnection("jdbc:odbc://192.168.0.0/dsn","","");
    here dsn is the name of the dsn created on the windows system.
    dsn - user, file, system dsn have been created and tested,

    which driver do I have to use?
    if the url used by me was correct?

  2. #2
    Ed
    Ed is offline Senior Member
    Join Date
    Jun 2007
    Posts
    110
    Rep Power
    0

    Default

    You can use file dsn for the connection:
    Java Code:
    DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=\\\\othersystem\\sharedfolder\\myaccessdb.mdb","","");
    you might try using url
    Java Code:
    //192.168.0.0/myaccess.mdb i

Similar Threads

  1. connect two applet
    By dg_iiita in forum Java Applets
    Replies: 0
    Last Post: 02-15-2008, 02:59 PM
  2. Replies: 1
    Last Post: 08-07-2007, 08:51 AM
  3. Replies: 1
    Last Post: 08-06-2007, 10:24 PM
  4. connect to MSDE
    By leonard in forum JDBC
    Replies: 1
    Last Post: 08-06-2007, 05:37 PM
  5. Java Microsoft VM vs JRE SUN
    By Ed in forum New To Java
    Replies: 2
    Last Post: 07-02-2007, 03:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •