Phenomenon:


If there is a timestamp column in a DataWindow and you do a Retrieve()... then do a ReSelectRow() to it and no rows are returned to the DataWindow. Just returns 0 rows and no errors. This is because the ReSelectRow() function is not supported in PowerServer Web.

 


Scenario:


Do a Retrieve() to a DataWindow with a column of datatype timestamp. Then, if you try to use the ReSelectRow() method, as in example:

IF dw_emp.Update( ) < 0 THEN
      dw_emp.ReselectRow(dw_emp.GetClickedRow())
END IF

Just returns 0 rows and no errors.

 


Workaround 1:


If the DataWindow's source table has a primary key, to work around this issue, follow the steps below:
 
Step 1: Use GetItem() to get the value of the primary column in the current row.
 
Step 2: Use SQL statement to retrieve data for the current row according to the value of the primary key.
 
Step 3: Use SetItem() to assign values to each column in the current row.
 
Step 4: Change the status of the current row to "NotModified!"
 
 

Workaround 2:


Replace the ReselectRow function with the Retrieve function.

 

0
0