5 Replies Latest reply on Sep 2, 2009 6:27 AM by tgoodmannz_bss

    Query MS Access Database

    tgoodmannz_bss Level 1

      OK - I have a customer that wants to write out to an MS Access Database from Livecycle.  I know this is BAD but they have their reasons - i.e. they have a sever shortage of skills for anything more complex.

       

      Firstly - I created a Java program to test the JDBC ODBC connection - this worked fine - ran queries and updated OK (code is attached)

       

       

      Howver I have tried connecting to Access from within Livecycle in two different ways - both are failing

       

      Firstly - using the JNDI setup for JDBC ODBC e.g.

       

      <datasources>
        <local-tx-datasource>
          <jndi-name>MSAccess_DS</jndi-name>
          <!-- format of URL is "jdbc:odbc:DSNNAME" -->
          <connection-url>jdbc:odbc:DBFormData</connection-url>
          <driver-class>sun.jdbc.odbc.JdbcOdbcDriver</driver-class>
          <user-name></user-name>
          <password></password>
        </local-tx-datasource>

      </datasources>

       

      Calling this within a Livecycle process does not return an error to the process, but the log generates an error:

       

      2009-08-29 23:01:30,768 WARN  [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
      org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: General error)

       

       

       

      I also tried creating a Java Component and importing it - by creating a very basic jar and importing it to livecycle (based on the same code I used in my Java testing)

       

      It also gave me the general error - and I can see it is happening on the line:

       

              Connection con = DriverManager.getConnection(dbURL, "","");

       

       

      Any ideas on what is going wrong, or a workaround?  (Assuming that I have to use Access)

       

       

      Thanks

      Tim