Simple & easy BUT urgent

Discussion in 'Java' started by Oussama Romdhane, Nov 17, 2012.

  1. hi everyone, I'm new here so hey there all !
    I just want you guys to give me the necessary line codes to connect an access data base (.mdb) to a java program (I'm working on web services using the soap exchange method)
    Thanks a lot
    OR
     
    Oussama Romdhane, Nov 17, 2012
    #1
    1. Advertising

  2. Oussama Romdhane

    Jeff Higgins Guest

    On 11/17/2012 06:02 PM, Oussama Romdhane wrote:
    > hi everyone, I'm new here so hey there all !
    > I just want you guys to give me the necessary line codes to connect an access data base (.mdb) to a java program (I'm working on web services using the soap exchange method)
    > Thanks a lot
    > OR

    import java.sql.*;
    class Scratch
    {
    public static void main(String[] args) {
    try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection c = DriverManager.getConnection("yourdatabaseurl");
    } catch (Exception e) {}
    }
    }
     
    Jeff Higgins, Nov 18, 2012
    #2
    1. Advertising

  3. Oussama Romdhane

    Arne Vajhøj Guest

    On 11/17/2012 6:02 PM, Oussama Romdhane wrote:
    > hi everyone, I'm new here so hey there all ! I just want you guys to
    > give me the necessary line codes to connect an access data base
    > (.mdb) to a java program (I'm working on web services using the soap
    > exchange method)


    With DSN:

    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con = DriverManager.getConnection("jdbc:eek:dbc:Test");

    DSN less:

    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con =
    DriverManager.getConnection("jdbc:eek:dbc:;Driver={Microsoft Access Driver
    (*.mdb)};Dbq=C:\\Databases\\Test.mdb;");

    But now the important part: The JDBC ODBC bridge is known to
    have problems - especially with concurrent usage. Web services
    will typical be concurrent usage. I will strongly recommend
    a different solution - maybe a different database.

    Arne
     
    Arne Vajhøj, Nov 18, 2012
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hazzard
    Replies:
    2
    Views:
    679
    Hazzard
    Apr 6, 2004
  2. Dave E
    Replies:
    7
    Views:
    772
    Josh Twist
    Jan 11, 2006
  3. Eric
    Replies:
    2
    Views:
    437
    kbutterly
    Dec 7, 2006
  4. Bruno Desthuilliers
    Replies:
    5
    Views:
    414
    Bruno Desthuilliers
    Aug 29, 2007
  5. Dave E
    Replies:
    7
    Views:
    224
    Josh Twist
    Jan 11, 2006
Loading...

Share This Page