rs.next();
customer.setData(rs.getString("C_DATA_200"));
reset(pyCustomerGetData);
}
District district = new District();
district.setWarehouse(w);
district.setId(d);
// Update DISTRICT
pyDistrictUpdate.setString(1, amount);
pyDistrictUpdate.setShort(2, w);
pyDistrictUpdate.setShort(3, d);
pyDistrictUpdate.executeUpdate();
reset(pyDistrictUpdate);
// Get the required information from DISTRICT
pyDistrictInfo.setShort(1, w);
pyDistrictInfo.setShort(2, d);
rs = pyDistrictInfo.executeQuery();
rs.next();
district.setName(rs.getString("D_NAME"));
district.setAddress(getAddress(rs, "D_STREET_1"));
reset(pyDistrictInfo);
Warehouse warehouse = new Warehouse();
warehouse.setId(w);
// Update WAREHOUSE
pyWarehouseUpdate.setString(1, amount);
pyWarehouseUpdate.setShort(2, w);
pyWarehouseUpdate.executeUpdate();
reset(pyWarehouseUpdate);
// Get the required information from WAREHOUSE
pyWarehouseInfo.setShort(1, w);
rs = pyWarehouseInfo.executeQuery();
rs.next();
warehouse.setName(rs.getString("W_NAME"));
warehouse.setAddress(getAddress(rs, "W_STREET_1"));
reset(pyWarehouseInfo);
// Insert HISTORY row
pyHistory.setInt(1, c);
pyHistory.setShort(2, cd);
pyHistory.setShort(3, cw);
pyHistory.setShort(4, d);
pyHistory.setShort(5, w);
pyHistory.setString(6, amount);
StringBuffer hData = new StringBuffer(24);
hData.append(warehouse.getName());
hData.append(" ");
hData.append(district.getName());
pyHistory.setString(7, hData.toString());
pyHistory.executeUpdate();
reset(pyHistory);
conn.commit();