setValues

Description

Replaces the value specified in the attrNames with the value specified in the values.

Syntax

void setValues(String[] attrNames, Object[] values)

Example

// create class foo ( a string, b int )

String sql = "select foo from foo";

String[] attr = { "a", "b" };  // a list of attribute names

String[] values = {"CUBRID", new Integer(2001)};

 

CUBRIDResultSet rs = (CUBRIDResultSet)stmt.executeQuery(sql);

 

while (rs.next ()) {

   CUBRIDOID oid = rs.getOID(1); 

   oid.setValues(attr, values );  

}