cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ba...@apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/acting DatabaseAddAction.java
Date Wed, 18 Apr 2001 01:11:55 GMT
balld       01/04/17 18:11:54

  Modified:    src/org/apache/cocoon/acting Tag: xml-cocoon2
                        DatabaseAddAction.java
  Log:
  patched to work with pre-1.2 JDBC drivers
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.23  +4 -4      xml-cocoon/src/org/apache/cocoon/acting/Attic/DatabaseAddAction.java
  
  Index: DatabaseAddAction.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/acting/Attic/DatabaseAddAction.java,v
  retrieving revision 1.1.2.22
  retrieving revision 1.1.2.23
  diff -u -r1.1.2.22 -r1.1.2.23
  --- DatabaseAddAction.java	2001/04/17 03:55:09	1.1.2.22
  +++ DatabaseAddAction.java	2001/04/18 01:11:53	1.1.2.23
  @@ -40,7 +40,7 @@
    * only one table at a time to update.
    *
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version CVS $Revision: 1.1.2.22 $ $Date: 2001/04/17 03:55:09 $
  + * @version CVS $Revision: 1.1.2.23 $ $Date: 2001/04/18 01:11:53 $
    */
   public class DatabaseAddAction extends AbstractDatabaseAction {
       protected static final Map addStatements = new HashMap();
  @@ -79,15 +79,15 @@
   
                   if ("manual".equals(mode)) {
                       String selectQuery = this.getSelectQuery(keys[i]);
  -
  -                    ResultSet set = conn.createStatement().executeQuery(selectQuery);
  +                    PreparedStatement select_statement = conn.prepareStatement(selectQuery);
  +                    ResultSet set = select_statement.executeQuery();
                       set.next();
                       int value = set.getInt("maxid") + 1;
   
                       statement.setInt(currentIndex, value);
   
                       set.close();
  -                    set.getStatement().close();
  +                    select_statement.close();
                       currentIndex++;
                   } else if ("form".equals(mode)) {
                       this.setColumn(statement, currentIndex, request, values[i]);
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message