eva/3 Application BuilderDeveloping Additional eva/3 ComponentsUser CommandsExamples for Tasks of an CommandExamples for database commands 

Modifying HSRecordSet data

Following Methods update the values of an HSRecordSet object:
void updateBoolean(int columnIndex, boolean b),
void updateBoolean(String columnName, boolean b),
void updateObject(int columnIndex, Object x),
void updateObject(String columnName, Object x)

The HSRecordSet has to be connected with a table to write the updated values in the underlaying database. If the HSRecordSet is connected with a view, the HSRecordSet will be updatable on one condition. The underlaying database supports the update of View.

The method updateRow() changes the underlaying database.

Example:

try
{
    TableDescriptor tDes = ObjectLoader.getTableDescriptor(
        "tables/customer.table");
    HSRecordSet hsRecordSet = new HSRecordSet(tDes);
    hsRecordSet.absolute(4);
    hsRecordSet.updateObject("lastname", "Miller");
    hsRecordSet.updateRow();
} catch (Exception e) {
    e.printStackTrace();
}