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

I don't know about this, but it seems indeed simpler.

However, if you want to use Torque for insertion, something like the
following will work (I'm not sure you still need to define the
"torque.database.*" properties, but I did)

TorqueSQLExec execSQLTask = new TorqueSQLExec();
execSQLTask.setProject(new Project());

execSQLTask.setAutocommit(false); // or true :)
execSQLTask.setDriver(conf.getString(MK[1])); // driver
execSQLTask.setUrl(conf.getString(MK[2])); // url
execSQLTask.setUserid(conf.getString(MK[3]));
execSQLTask.setPassword(conf.getString(MK[4]));

execSQLTask.setSrcDir(sqlDir.getAbsolutePath()); // directory with SQL
scripts
// you will need to generate the sqldb.map before executing
execSQLTask.setSqlDbMap(sqlDbMap.getAbsolutePath());

try { execSQLTask.execute(); }
catch (org.apache.tools.ant.BuildException be) { ... }

HTH,
Simon
--
Simon Vallet
T-Systems e-technologies
[EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to