You may want to look into batch updates:

http://java.sun.com/docs/books/tutorial/jdbc/jdbc2dot0/batchupdates.html

Quoting Julia Weaver <[EMAIL PROTECTED]>:

> Andrew, Thanks for your fast response.
> 
> Yes, my user need to edit a whole bunch of records
> (rows), and there might be more than 20, and for each
> update, my code have to call updateRecord method to
> connect to database, and do the following:
> try {
>  stmt = conn.prepareStatement(stringSQL);
>  rs = stmt.executeQuery();
>  while (rs.next()) {
>  
>  ...update record....
> 
>  rs.close();
>  stmt.close();
>  
> ...disconnect database...
> 
> For each record process the code, so the performance
> is very slow...
> 
> Could you please give me more help?
> 
> 
> 
> --- Andrew Hill <[EMAIL PROTECTED]>
> wrote:
> > You mean like edit a whole bunch of records (rows)
> > at one go where you dont
> > necessarily know how many there are, etc...?
> > 
> > Take a look at the examples here:
> > http://www.keyboardmonkey.com/next/index.jsp
> > (btw: You didnt really make your problem very clear
> > so I hope this was what
> > you meant)
> > 
> > 
> > 
> > -----Original Message-----
> > From: Julia Weaver
> > [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, 23 December 2003 22:12
> > To: Struts Users Mailing List
> > Subject: how to perform update records faster?
> > 
> > 
> > Hi All,
> > 
> > Can someone please tell me how I able to do
> > update/modify records faster? My user need to
> > click/select individual records to update in one big
> > table(or one web page). Since there are so many
> > records need to update continually, is a way can
> > perform faster? Someone told me using session and
> > Arraylist, another person told me using pop-up
> > window,
> > but I do not know how to use these specifially, can
> > anyone help me?
> > 
> > Thanks,

-- 
Kris Schneider <mailto:[EMAIL PROTECTED]>
D.O.Tech       <http://www.dotech.com/>

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

Reply via email to