On Fri, 2002-02-01 at 18:05, Vittorio Ballestra wrote: > the method getTables in MetaData implementation class isn't case > insensitive. This is a problem when using sapdbc with jboss. > I've patched the driver but cannot compile it because the sources > downloaded from the site are not complete (NameHandling.java is > missing).
See http://groups.yahoo.com/group/sapdb-general/message/120 to compile the sources. NameHandling is distributed by Sap only in binary format. Laurent > Anyway I've attached the patch. > > P.S.: I've already submitted a bug to jboss but they rejected it with > the reason that's a JDBC driver bug. I agree with them because SQL > should be case insensitive and so should behave the MetaData class ... > ---- > > Only in sapdb-jdbc/com/sap/dbtech/jdbc: .ConnectionSapDB.java.swp > diff -r -u sapdb-jdbc/com/sap/dbtech/jdbc/DatabaseMetaDataSapDB.java >sapdb-jdbc.orig/com/sap/dbtech/jdbc/DatabaseMetaDataSapDB.java > --- sapdb-jdbc/com/sap/dbtech/jdbc/DatabaseMetaDataSapDB.java Fri Feb 1 17:48:09 >2002 > +++ sapdb-jdbc.orig/com/sap/dbtech/jdbc/DatabaseMetaDataSapDB.java Fri Feb 1 >17:56:48 2002 > @@ -782,16 +782,15 @@ > + "PRIVILEGE, " > + "IS_GRANTABLE " > + "FROM domain.tableprivileges "); > - String conj = "WHERE "; > if (this.realPatternQualification(schemaPattern)) { > - qualification.append (conj); > - qualification.append ("owner LIKE '" + schemaPattern.toUpperCase() + "' >"); > - conj="AND "; > + qualification.append ("AND owner LIKE '" + schemaPattern + "' "); > } > if (this.realPatternQualification(tableNamePattern)) { > - qualification.append (conj); > - qualification.append ("tablename LIKE '" + >tableNamePattern.toUpperCase() + "' "); > - conj="AND "; > + qualification.append ("AND tablename LIKE '" + tableNamePattern + "' "); > + } > + if (qualification.length () > 0) { > + cmd.append ("WHERE 1 = 1 "); > + cmd.append (qualification.toString ()); > } > cmd.append (" ORDER BY owner, tablename "); > return this.internalQuery (cmd.toString (), "getTablePrivileges"); > @@ -1606,4 +1605,4 @@ > public boolean usesLocalFiles() throws SQLException { > return false; > } > -} > +} > \ No newline at end of file _______________________________________________ sapdb.general mailing list [EMAIL PROTECTED] http://listserv.sap.com/mailman/listinfo/sapdb.general
