Project

General

Profile

« Previous | Next » 

Revision 626

Added by berkley about 24 years ago

fixed sql error

View differences:

src/edu/ucsb/nceas/metacat/QuerySpecification.java
275 275
    StringBuffer self = new StringBuffer();
276 276

  
277 277
    self.append("SELECT docid,docname,doctype,doctitle,");
278
    self.append("date_created, date_updated ");
278
    self.append("date_created, date_updated, rev ");
279 279
    self.append("FROM xml_documents WHERE docid IN (");
280 280

  
281 281
    // This determines the documents that meet the query conditions
src/edu/ucsb/nceas/metacat/DBQuery.java
161 161
        QuerySpecification qspec = new QuerySpecification(xmlquery, 
162 162
                                   parserName, 
163 163
                                   util.getOption("accNumSeparator"));
164
        //System.out.println(qspec.printSQL());
164
       // System.out.println(qspec.printSQL());
165 165
        pstmt = conn.prepareStatement( qspec.printSQL() );
166 166

  
167 167
        // Execute the SQL query using the JDBC connection
......
203 203
            //btBuf.append("?docid=").append(docid).append("'");
204 204
            btBuf.append("%docid=").append(docid).append("'");
205 205
            //System.out.println("sql: " + btBuf.toString());
206
            
207 206
            pstmt = conn.prepareStatement(btBuf.toString());
208 207
            pstmt.execute();
209 208
            ResultSet btrs = pstmt.getResultSet();

Also available in: Unified diff