1 Reply Latest reply on Jun 20, 2003 12:53 AM by Jon Barnett

    How to configure MS Access datasource

    peich_sun Newbie

      what xml files have to be created or modified?

      these are the info that i have :
      database driver = sun.jdbc.odbc.JdbcOdbcDriver
      database url = jdbc:odbc:[dsn name]
      host = [hostname]
      user = [username]
      password = [password]

      the problem is :

      1. what should be the datasource and the datasource-mapping in the standardjbosscmp-jdbc.xml? i know the values for the ms sql but not for ms access.
      java:/MSSQLDS
      <datasource-mapping>MS SQLSERVER</datasource-mapping>

      2. what should be the datasource and type-mapping in the standardjaws.xml? for the ms sql, it is
      java:/MSSQLDS
      <type-mapping>MS SQLSERVER</type-mapping>

      3. how do i create the jca adaptor (*-ds.xml)? what should be the filename when you will use MS Access?

        • 1. Re: How to configure MS Access datasource
          Jon Barnett Master

          You can call the datasource name anything you want. For example myaccessdb-ds.xml. JBoss deployment does not care as long as the file ends with -ds.xml and the datasource defined within does not clash with an existing bound JNDI name.

          The contents will probably look like this:
          <?xml version="1.0" encoding="UTF-8"?>

          <!-- ===================================================================== -->
          <!-- -->
          <!-- Generic datasource configuration showing all possibilities -->
          <!-- -->
          <!-- ===================================================================== -->

          <!-- $Id: generic-ds.xml,v 1.1 2002/07/24 03:27:53 d_jencks Exp $ -->


          <local-tx-datasource>
          <jndi-name>AccessDS</jndi-name>
          <connection-url> jdbc:odbc:dsn-name</connection-url>
          <driver-class>sun.jdbc.odbc.JdbcOdbcDriver</driver-class>
          <user-name>x</user-name>
          y

          </local-tx-datasource>



          Substitute your own dsn-name, username and password.

          As for your mapping, I guess you can start with MS SQLSERVER as that is pretty close to Access.

          Otherwise, you will need to create your own <type-mapping-definition>, probably using a copy of the mapping definition for MS SQLSERVER as your starting point.