Project

General

Profile

« Previous | Next » 

Revision 768

Added by bojilova almost 23 years ago

MS SQL Server stores trailing spaces in varchar fields which shouldn't be
thus added docid.trim() in the Java code

View differences:

src/edu/ucsb/nceas/metacat/DBQuery.java
235 235
        boolean tableHasRows = rs.next();
236 236
        while (tableHasRows) 
237 237
        {
238
          docid = rs.getString(1);
238
          docid = rs.getString(1).trim();
239 239
          if ( !hasPermission(dbconn2, user, group, docid) ) {
240 240
            // Advance to the next record in the cursor
241 241
            tableHasRows = rs.next();
......
295 295
                                   "DBQuery.findDocuments: " + e.getMessage());
296 296
              }
297 297
              
298
              docid   = xmldoc.getDocID();
298
              docid   = xmldoc.getDocID().trim();
299 299
              docname = xmldoc.getDocname();
300 300
              doctype = xmldoc.getDoctype();
301 301
              createDate = xmldoc.getCreateDate();
......
379 379
          tableHasRows = rs.next();
380 380
          while(tableHasRows) 
381 381
          {
382
            docid = rs.getString(1);
382
            docid = rs.getString(1).trim();
383 383
            if ( !hasPermission(dbconn2, user, group, docid) ) {
384 384
              // Advance to the next record in the cursor
385 385
              tableHasRows = rs.next();

Also available in: Unified diff