public boolean hasTableOrColumnCaseSensitive(String table, String column) {

        boolean result = false;
        ResultSet set = null;

        try {
            if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(column)) {
                // Check if the column is given
                set = m_con.getMetaData().getColumns(null, null, table, column);
                if (set.next()) {
                    String colname = set.getString("COLUMN_NAME");
                    if (colname.equalsIgnoreCase(column)) {
                        result = true; // The column is available
                    }
                }
            } else if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(table)) {
                // Check the table
                set = m_con.getMetaData().getTables(null, null, table, null);
                if (set.next()) {
                    String tablename = set.getString("TABLE_NAME");
                    if (tablename.equalsIgnoreCase(table)) {
                        result = true;
                    }
                }
            }
        } catch (SQLException e) {
            e.printStackTrace();
            result = false;
        } finally {
            try {
                if (set != null) {
                    set.close();
                }
            } catch (SQLException e) {
                e.printStackTrace();
            }
        }
        return result;
    }
public boolean hasTableOrColumnCaseSensitive ( String table , String column ) { boolean result = false ; ResultSet set = null ; try { if ( CmsStringUtil . isNotEmptyOrWhitespaceOnly ( column ) ) { set = m_con . getMetaData ( ) . getColumns ( null , null , table , column ) ; if ( set . next ( ) ) { String colname = set . getString ( "COLUMN_NAME" ) ; if ( colname . equalsIgnoreCase ( column ) ) { result = true ; } } } else if ( CmsStringUtil . isNotEmptyOrWhitespaceOnly ( table ) ) { set = m_con . getMetaData ( ) . getTables ( null , null , table , null ) ; if ( set . next ( ) ) { String tablename = set . getString ( "TABLE_NAME" ) ; if ( tablename . equalsIgnoreCase ( table ) ) { result = true ; } } } } catch ( SQLException e ) { e . printStackTrace ( ) ; result = false ; } finally { try { if ( set != null ) { set . close ( ) ; } } catch ( SQLException e ) { e . printStackTrace ( ) ; } } return result ; }
Checks if the given table, column or combination of both is available in the database in a case sensitive way.<P>

@param table the sought table
@param column the sought column

@return true if the requested table/column is available, false if not