Code example for ResultSet

Methods: getBytes

0
    protected void setBinaryData(PreparedStatement s, int index, byte data[]) throws SQLException {
        s.setBytes(index, data);
    } 
 
    protected byte[] getBinaryData(ResultSet rs, int index) throws SQLException {
        return rs.getBytes(index);
    } 
 
    public void doCreateTables(Connection connection) throws SQLException, IOException {
        Statement s = null;
        try { 
            // Check to see if the table already exists. If it does, then don't 
            // log warnings during startup. 
            // Need to run the scripts anyways since they may contain ALTER 
            // statements that upgrade a previous version of the table 
            boolean alreadyExists = false;
            ResultSet rs = null;
            try { 
                rs = connection.getMetaData().getTables(null, null, statements.getFullStoreTableName(),
                        new String[] {"TABLE" });
                alreadyExists = rs.next();