Accesses the database to retrieve values for all columns that can be updated and refreshes all timestamp columns in a row in a DataWindow control or DataStore. The values from the database are redisplayed in the row.
DataWindow type |
Method applies to |
---|---|
PowerBuilder |
DataWindow control, DataWindowChild object, DataStore object |
Web |
Server component |
Web ActiveX |
DataWindow control, DataWindowChild object |
integer dwcontrol.ReselectRow ( long row )
Web DataWindow server component
short dwcontrol.ReselectRow ( long row )
number dwcontrol.ReselectRow ( number row )
Argument |
Description |
---|---|
dwcontrol |
A reference to the DataWindow control, DataStore, or child DataWindow in which you want to reselect a row |
row |
A value identifying the row to reselect |
Returns 1 if it is successful and –1 if the row cannot be reselected (for example, the DataWindow object cannot be updated or the row was deleted by another user).
If any argument’s value is null, in PowerBuilder and JavaScript the method returns null.
ReselectRow is supported for SQLSelect DataWindows. Use ReselectRow to discard values the user changed and replace them with values from the database after an update fails (due to a concurrent access error, for example).
About timestamp support Timestamp support is not available in all DBMSs. For information on timestamp columns, see the documentation for your DBMS.
This statement reselects row 5 in the DataWindow control dw_emp:
dw_emp.ReselectRow(5)
This statement reselects the clicked row if the update is not successful:
IF dw_emp.Update( ) < 0 THEN
dw_emp.ReselectRow(dw_emp.GetClickedRow())
END IF