About MS Access and JDBC


EJB programming & troubleshooting: About MS Access and JDBC

  1. About MS Access and JDBC (1 messages)

    Hi I'm from Argentina, so sorry for my english...

    I want to know, haw to connect to an access database...
    Some sample code...


  2. Hi Matias

    Firstly, u have to create a datasource name for the acess database u created. This can be done by going to the odbc connectivity and create a dsn for access database.

    U can use the jdbc odbc bridge driver which comes with the jdk.

    the sample

    Connection dbCon;

    try {
    dbCon = DriverManager.getConnection("jdbc:odbc:Mark");
    } catch(Exception e) {
    Here "Mark" is the datasource for the particular database.

    I think this would help u a lot
    for any further clarification contact