That`s the way it should be, but does not work either.

        String[] names = { "TABLE" };
        ResultSet result = null;
        DatabaseMetaData metadata = null;

        try {
            metadata = dbConnection.getMetaData();
            result = metadata.getTables(null, null, null, names);
            while(result.next()) {
                System.out.println(result.getString("TABLE_NAME"));
            }
        } catch(java.sql.SQLException e) {
            e.printStackTrace();
        }



Am 03.10.2007 um 15:44 schrieb Bryan Pendleton:

            while((result.next()) & (tableExists = false)) {

Is this possibly a typo? Make sure it says:

             while((result.next()) && (tableExists == false)) {

You want to do a logical and, not a bitwise and; also you want
to do a comparison, not an assignment.

thanks,

bryan


Reply via email to