dirkv       2004/03/07 07:28:36

  Modified:    dbcp/src/test/org/apache/commons/dbcp
                        TesterPreparedStatement.java
  Log:
  sql of preparedstatement is dependent on the catalog setting of the connection
  
  Revision  Changes    Path
  1.12      +16 -1     
jakarta-commons/dbcp/src/test/org/apache/commons/dbcp/TesterPreparedStatement.java
  
  Index: TesterPreparedStatement.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/dbcp/src/test/org/apache/commons/dbcp/TesterPreparedStatement.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- TesterPreparedStatement.java      28 Feb 2004 11:47:52 -0000      1.11
  +++ TesterPreparedStatement.java      7 Mar 2004 15:28:36 -0000       1.12
  @@ -38,19 +38,34 @@
   public class TesterPreparedStatement extends TesterStatement implements 
PreparedStatement {
       private ResultSetMetaData _resultSetMetaData = null;
       private String _sql = null;
  +    private String _catalog = null;
   
       public TesterPreparedStatement(Connection conn) {
           super(conn);
  +        try {
  +            _catalog = conn.getCatalog();
  +        } catch (SQLException e) { }
       }
   
       public TesterPreparedStatement(Connection conn, String sql) {
           super(conn);
           _sql = sql;
  +        try {
  +            _catalog = conn.getCatalog();
  +        } catch (SQLException e) { }
       }
   
       public TesterPreparedStatement(Connection conn, String sql, int resultSetType, 
int resultSetConcurrency) {
           super(conn, resultSetType, resultSetConcurrency);
           _sql = sql;
  +        try {
  +            _catalog = conn.getCatalog();
  +        } catch (SQLException e) { }
  +    }
  +    
  +    /** for junit test only */
  +    public String getCatalog() {
  +        return _catalog;
       }
   
       public ResultSet executeQuery(String sql) throws SQLException {
  
  
  

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

Reply via email to