DataWindow control


CanUndo function


CanUndo function is unsupported.


Replace the CanUndo function with ModifiedCount function.


The original code:

if dw_1.CanUndo() Then 
end if

The modified code:

if dw_1.ModifiedCount() > 0 Then 
End if
DBCancel function


DBCancel function is unsupported.


Appeon has its own mechanism to retrieval data. This function can be simply commented out.

Functionality difference

All the retrieved data will be returned at the same time.

GenerateResultSet function


The ResultSet system object and GenerateResultSet method are unsupported.


To work around the GenerateResultSet method, we have the following two methods:

Method #1: Use GetFullState to retrieve data from a DataWindow and then use SetFullState to apply the blob returned from GetFullState to another DataWindow.

Method #2: Use the property to retrieve data from a DataWindow into a string and insert data into the DataWindow from the string by ImportString.

GetTrans function


The DataWindow GetTrans function is unsupported.


Comment out the unsupported script. Instead use the SetTransObject connection method, to assign a programmer-specified transaction object or a global transaction object called SQLCA to a DataWindow control or DataStore.

To use SetTransObject, write code that performs the following tasks:

  1. Set up the transaction object by assigning values to its fields (usually in the application's Open event).

  2. Connect to the database using the SQL CONNECT statement and the transaction object (in the Open event for the application or window).

  3. Call SetTransObject to associate the transaction object with the DataWindow control or DataStore (usually in the window's Open event).

  4. Check the return value from the Update method and follow it with an SQL COMMIT or ROLLBACK statement, as appropriate.

ReselectRow function


The DataWindow ReselectRow method is unsupported.

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.

ResetTransObject function


The ResetTransObject function of a DataWindow control or a DataStore is unsupported.


Replace the ResetTransObject function with SetTransObject function.


The original script:


The modified script:

SaveAsAscii function


SaveAsAscii function for DataWindow is unsupported.


Use a server NVO to work around the SaveAsAscii function.

Step 1: Encapsulate the SaveAsAscii function into a NVO and deploy the NVO to EAServer.

Step 2: Call to the NVO SaveAsAscii function, and store the generated ASCII text file to the Web Server web root.

Step 3: Send the URL of the generated files to client side using the HyperLinkToURL function of Inet object.


The DataWindow that calls the SaveAsASCII must be deployed to EAServer as well.

All the DataWindow SaveAs types that are unsupported can be worked around in this way.

Scroll function


The Scroll function of DataWindow control is unsupported.


Replace the Scroll function with ScrollToRow, ScrollPriorPage or ScrollNextRow function.

Functionality difference

The event sequence of the corresponding function will be triggered.


The original script:


The modified script. Please note that the event sequence of the ScrollToRow function will be triggered.

dw_1.ScrollToRow(dw_1.GetRow() + 3)
SetTrans function


Using SetTrans to establish a connection to the transaction object is unsupported.


Use the SetTransObject method.


The original script:

i = ids_main.SetTrans(itr_sql)

Re-write it using the following format:



ScrollVertical event


ScrollVertical event is unsupported.


You can choose either of the following two ways to work around the ScrollVertical event.

To work around the ScrollVertical event for a single DataWindow

Step 1: Define a user-defined event such as ue_scrollvertical to replace ScrollVertical.

Step 2: Place the same code that you plan to put in ScrollVertical in the user-defined event.

Step 3: In the Timer event of the window that hosts the DataWindow, trigger the user-defined event periodically with the following code:

long ll_new_firstrow 
ll_new_firstrow = long(dw_2.Object.DataWindow.firstRowOnPage) // Assuming the DataWindow is dw_2 
if ll_new_firstrow <> il_old_first_row then 
 dw_2.trigger event ue_scrollvertical() 
 il_old_first_row = ll_new_firstrow 
end if

Step 4: Call the Timer event in the Open event of the window with the following code:


To work around the ScrollVertical event for ancestor DataWindow

You can code the workaround once in the ancestor DataWindow and then apply it for as many DataWindow as you want.

Supposing the ancestor window is w_sheet and the ancestor DataWindow is u_dw:

Step 1: Start the Timer event in the Open event of w_sheet.

string ls_timer_interval 
ls_timer_interval = & 
ProfileString( gnv_app.of_getappinifile( ), "timer", "interval", "0.005" ); 

Step 2: In the pfc_postopen event of w_sheet, add the following code for getting all the DataWindows.

of_sb_get_dwobjects( this.control );

Step 3 - Add a new function called of_sb_get_dwobjects (windowobject awo_control[]) in w_sheet.

int        i; 
tab        lt_tab; 
userobject luo_temp; 
u_dw       lu_dw

for i = 1 to upperbound( awo_control ) 
 if( TypeOf( awo_control[i] ) = Tab! ) then 
  lt_tab = awo_control[i]; 
  of_sb_get_dwobjects( lt_tab.control ); // Recursive call 
 elseif( TypeOf( awo_control[i] ) = UserObject! ) then 
  luo_temp = awo_control[i]; 
  of_sb_get_dwobjects( luo_temp.control ); // Recursive call 
 elseif( TypeOf( awo_control[i] ) = DataWindow! ) then 
  // iu_dw is an instance variable that is an array of u_dw datawindow controls 
  iu_dw[ upperbound(iu_dw) + 1 ] = awo_control[i]; 
 end if 

Step 4: In the Timer event for w_sheet, add the following code to check row changes happened to all the DataWindows:

int i

for i = 1 to upperbound(iu_dw)

Step 5: Add an instance variable for u_dw.

long il_old_first_row = -1;

Step 6: Add a new function of_sb_verticalscroll( ) for u_dw.

long ll_new_firstrow, ll_counter // Check if only one row per page is being displayed in dw
ll_new_firstrow = long( this.object.DataWindow.FirstRowOnPage);
if (ll_new_firstrow <> il_old_first_row) then
 il_old_first_row = ll_new_firstrow
 this.trigger event ue_scrollvertical( )
end if;

Step 7: Define a user-defined event for u_dw such as ue_scrollvertical to replace ScrollVertical.

Step 8: Place the same code that you plan to put in ScrollVertical in the user-defined event.

RetrieveRow event


The RetrieveRow event is unsupported.


Move the relevant logic to the RetrieveEnd event.


The original script in the RetrieveRow event:

if row < 1 then return
// for every single time, check whether the row should be deleted or not.
if f_find(istr_dwnum.dw,"='"+this.getitemstring(row,"'")>0 then
end if

The modified RetrieveEnd event (preceding logic is moved to the RetrieveEnd event):

long li_row
// loop all rows retrieved from the database and find out which row should be deleted.
for li_row = 1 to rowcount
 if f_find(istr_dwnum.dw,"='"+this.getitemstring(li_row,
 +"'")>0 then
     li_row --
 end if


LiveScroll property


The LiveScroll property for DataWindow control is unsupported.


When the LiveScroll property is enabled, it does not take effect on the Web. A row can only be selected by mouse clicking.