db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michel Beijlevelt" <...@lucka.nl>
Subject Re: runtime SQL script execution using torque
Date Tue, 29 Jul 2003 13:57:44 GMT
If this is all you do with the database, I don't really see why you would
want to use Torque.

- Torque takes care of mapping db objects to Java objects, but you're not
using that functionality when loading SQL scripts into the db.
- Torque takes care of encapsulating RDBMS-specific issues, but you won't
be using that functionality either when loading SQL scripts into the db.
Actually, the SQL scripts already have to be specific to your RDBMS.

If you're using JSPs, the JSTL <sql:query> seems to be the easiest way.

gr. Michel



> Hi all,
>
> In my web-application, I want to be able to execute SQL scripts at
> runtime.
> This script includes DROP TABLE, CREATE TABLE, and simple SELECT and
> INSERT
> commands.
> I thought of using TorqueSQLExec, but I am wondering how to configure it
> properly.
> The build.properties for the generation part of torque uses other
> properties
> for configuration than the properties file for the runtime part.
>
> example generation time properties:
> torque.database.createUrl =
> torque.database.buildUrl =
> torque.database.url =
> torque.database.driver =
> torque.database.user =
> torque.database.password =
> torque.database.host =
> torque.database.Name =
> torque.database.schema =
>
> example runtime properties:
> torque.dsfactory.xxx.datasource.driver =
> torque.dsfactory.xxx.datasource.url =
> torque.dsfactory.xxx.datasource.user =
> torque.dsfactory.xxx.datasource.password =
>
> Could I make use of the runtime configuration properties? How?
>
> Anybody tried something like this before?
>
> Any reasons not to do this?
>
> (better) alternatives for executing an SQL script?
>
> Remke
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
>


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


Mime
View raw message