1 Reply Latest reply on Nov 16, 2003 7:49 AM by Jon Barnett

    Using ODBC with JBoss 3.2.2

    ardick Newbie

      Dear all,

      I am a newbie in JBoss and would like to ask what steps do I need to configure the JBoss container accessing a datasource using ODBC.

      For my own study, I would like to use MS Access as my database. I prefered to use ODBC to connect the Access because others setting will be similar to this (such as MSSQL).

      Thanks for your concern

        • 1. Re: Using ODBC with JBoss 3.2.2
          Jon Barnett Master

          You will need to employ a JDBC-ODBC bridge to achieve this. Also, since Access is a file-based database, you will need to run JBoss on the same machine as the database.

          If you use the Sun JDBC-ODBC driver (used in the example template), you will need to download the driver from the Sun site and place it in JBOSS_HOME/server/default/lib assuming you are going to run the default run-time instance of JBoss.

          Read up on how the JDBC-ODBC driver is configured and how the URL relates to the DSN - there should be documents on the Sun site as well as with the driver download. That will tell you what the elements of the connection URL mean - jdbc:odbc:INsightDSN in the example.

          Use the msaccess-ds.xml templates from JBOSS_HOME/docs/examples/jca. Copy it to JBOSS_HOME/server/default/deploy and modify the file according to your requirements - connection URL, username and password. You can rename the file anything as long as it ends with -ds.xml so JBoss recognises it as a datasource definition.

          Actually, the SQL Server JDBC driver is a full JDBC (Type 4) driver usually rather than the bridge used for Access.