|
hello, all
I verified the Cocoon1.8 & JDBC/ODBC bridge
class and Turbine engine again this morning, and here is my final
result:
The adaptor name DBOdbc is no use, as to why I
succeed yesterday, maybe I didn't update two cocoon.properties file both in
webapp directory below tomcat director
"tomcat/webapp/cocoon.properties" and my new example
directory "webapp/mysamples/cocoon.properties".
So it means you have to change a line like this to
fool Turbine to load JDBC/ODBC java class:
#a trick to replace informix driver with jdbc2odbc
driver
# processor.xsp.pool.database.adaptor.DBInformix=com.informix.jdbc.IfxDriver processor.xsp.pool.database.adaptor.DBInformix=sun.jdbc.odbc.JdbcOdbcDriver However, I find that if I just define driver in xsp
file instead of using tag
<esql:use-connection>MyDBOdbc</esql:use-connection>:
<esql:execute-query>
<esql:driver>sun.jdbc.odbc.JdbcOdbcDriver</esql:driver> <esql:dburl>jdbc:odbc:MyDBTest</esql:dburl> <esql:username>test</esql:username> <esql:password>test</esql:password> <esql:query> SELECT * FROM tabell1 </esql:query> <esql:results> <ID><esql:get-string column="ID"/></ID> <FN><esql:get-string column="First_Name"/></FN> </esql:results> <esql:no-results> <error>no results were found</error> </esql:no-results> </esql:execute-query> then, I won't bother to setup turbine engine in cocoon.properties file. So I wonder what the difference is between using turbine engine or not? any
outstanding advantages with turbine engine?
Addtionally, Now I wonder whether I can set a
page-division to my request? Normally, if a sql request get too many records, I
would rather get some fixed amount records each time, for example, just return
20 records once, but still I have to continue the query, is it easy to do with
cocoon? I know one can get the whole records once, and just display some,
but maybe it is not the best solution, anymore has comments about this? I think
it very common, and maybe can be put into consideration earlier.
Best regards!
|
- Help for Cocoon 1.8 & MS. Access database!!! beichuang
- beichuang
