cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Cocoon Wiki] Update of "Access" by JosephPecore
Date Mon, 20 Jun 2005 13:35:19 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Cocoon Wiki" for change notification.

The following page has been changed by JosephPecore:

New page:
= Connection to Microsoft Access (via odbc) =
This document explains the specific aspects of connecting Cocoon to a Microsoft Access Database
via odbc. 
This should work with any odbc compliant data source.

For a general explanation on database connections please refer to the [
official Cocoon documentation ].

== Installing the JDBC drivers ==

 *  odbc is part of JDK, so you don't need to install anything.

== Setting the web.xml configuration ==

In the $COCOON_LIB/WEB-INF/ directory you will find the web.xml file. Open it and look for
this rows {{{
here you have to add the following line:
<!-- For ODBC: -->


== Setting the cocoon.xconf configuration ==

Search for:
add into this element these lines:
  <jdbc name="YourPoolName">
    <pool-controller min="5" max="10"/>

== Setting the sitemap.xmap configuration ==

When you want to use the connection with the SQLTransformer you just call the JDBC name inside
the pipeline in this way:
<map:match pattern="sqlquery">
  <map:generate src="sql/sqlquery.xml"/>
  <map:transform type="sql">
    <map:parameter name="use-connection" value="YourPoolName"/>
  <map:transform type="xslt" src="../stylesheets/transformation.xslt"/>
  <map:serialize />
Obviously you have to adapt this sample to fill your need.[[BR]]

== Setting up ODBC Source
a. Start > Settings > Control Panel > Administrative Tools > Data sources (ODBC)
b. Select the tab labeled ‘System DSN’   (I tried User DSN, but it did not work!)
c. Click ‘Add’
d. Select the type of data source you want to create, e.g. Microsoft Access Driver
e. Supply a name for the data source (This needs to match the YourODBCSourceName cocoon.xconf!
f. The ‘description’ is optional
g. Click the ‘Select’ button under ‘Database’ to bring-up a file browse dialog
h. Use the dialog to select the database file 

== Comments from the readers ==

View raw message