You could always put multiple SQL statements in a single cfquery.

Matt Liotta
R337 Consulting LLC
http://r337.com


On May 10, 2004, at 11:24 AM, Jon Gunnip wrote:



Sorry if this is too off-topic, but I figured I might ask due to the recent Java discussions.

I'm using Oracle 9i, and I have a few situations where I need to
insert/update multiple rows (possibly hundreds of rows).

With <cfquery>, I have to do a loop around the <cfquery> which means I
have to make one trip to the database for each row I want to affect.
This is not very scalable.

I looked at using Oracle stored procs, but we couldn't figure out how
to pass arrays to stored procs (only strings) so that didn't offer a
clean solution.

I noticed JDBC had something like an addBatch() statement where I could
add multiple statements and submit them in one batch.  It looks very
clean.

My question is: is accessing JDBC a good way to go to execute multiple
database statements?  Is there a better way.

If so, does anyone have any references or pointers on how to do this?
I can read Java code and hack something together. Ideally, I would like
to access the pooled connections of the JRun server, but I'm not sure
how I can access the runtime environment. I assume to build and test it
I would have to deploy it within the JRun server and not just have my
Classpath point to the appropriate CF java libraries.


Thanks,
Jon


---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email.


CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to