Hello,
I'm trying to access a MSSQL database in cocoon via ODBC.
I added this code to web.xml
<init-param>
<param-name>load-class</param-name>
<param-value>
<!-- For parent ComponentManager sample:
org.apache.cocoon.samples.parentcm.Configurator -->
<!-- For IBM WebSphere:
com.ibm.servlet.classloader.Handler -->
<!-- For JDBC-ODBC Bridge: -->
sun.jdbc.odbc.JdbcOdbcDriver
</param-value>
</init-param>
and this to cocoon.xconf
<datasources>
<jdbc name="odbcsql">
<pool-controller min="5" max="10"/>
<dburl>
jdbc:odbc:roelDatabase
</dburl>
<user>
roel
</user>
<password>
roel
</password>
</jdbc>
</datasources>
this is my test page
<?xml version="1.0"?>
<xsp:page language="java"
xmlns:xsp="http://apache.org/xsp"
xmlns:esql="http://apache.org/cocoon/SQL/v2"
>
<page>
<esql:connection>
<esql:pool>odbcsql</esql:pool>
<my_table_element>
<esql:execute-query>
<esql:query>
select Username as myfield1, Department as myfield2 from Users
</esql:query>
<esql:results>
<esql:row-results>
<my_row_element>
<my_column_one_element><esql:get-string column="myfield1"/></my_column_one_element>
<my_column_two_element><esql:get-string column="myfield2"/></my_column_two_element>
</my_row_element>
</esql:row-results>
</esql:results>
<esql:no-results>
<no-results>no-results</no-results>
</esql:no-results>
</esql:execute-query>
</my_table_element>
</esql:connection>
</page>
</xsp:page>
but as a result i get
odbcsql select Username as myfield1, Department as myfield2 from Users no-results
I see no error and there is info in the database.
If I change <esql:pool>odbcsql</esql:pool> to <esql:pool>blabla</esql:pool>
the result is
blabla select Username as myfield1, Department as myfield2 from Users no-results
still no error.
There must be a config problem, but I cannot find what.
Somebody knows the solution?
Tnx
