commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eladio <ela...@caritos.com>
Subject [DbUtils] - Constructing QueryRunner Instance using java.sqlConection parameter
Date Fri, 12 Dec 2003 20:35:16 GMT
The example found in
http://jakarta.apache.org/commons/dbutils/examples.html statest that you
can configure QueryRunner with a DataSourse as well as a Database
Connection.

I can not find how that is down looking at the constructor methods.  Only
found 2, one with no arguments, the other with a datasource.


Text from example page:

 Explanation

   1. Configure QueryRunner with the DataSource. Note that QueryRunner has
methods that take a java.sql.Connection so you are not required to use
DataSources.
   2. Implement the ResultSetHandler interface or use one of the provided
implementations. This one converts a ResultSet row into a bean.
   3. Execute the SQL statement with one replacement parameter and return
the results in a new Person object (generated by the handler in step 2).




---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message