|
of_createupdatesequence
|
|
Full name
|
pfc_n_cst_dwsrv_linkage.of_createupdatesequence
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_createupdatesequence(ref u_dw[])
|
Name
|
Datatype
|
li_i
|
Integer
|
li_numdetails
|
Integer
|
li_rc
|
Integer
|
public function integer of_createupdatesequence (ref u_dw adw_sequence[]);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_CreateUpdateSequence
//
// Access: Public
//
// Arguments:
// adw_sequence An array of u_dw (passed by reference) to hold the update sequence.
//
// Returns: Integer
// 1 if it succeeds and -1 if an error occurs.
//
// Description: Returns an array holding the Default Update Sequence.
// To determine the Default TopBottom sequence, then traverse the
// array from 1 to the array upperbound.
// To determine the Default BottomUp sequence, then traverse the
// array from the upperbound to 1.
//
// Note: This function is not typically called by the developer.
// Used internally to create the sequence of datawindow updates.
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 5.0 Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
// Copyright © 1996-1997 Sybase, Inc. and its subsidiaries. All rights reserved.
// Any distribution of the PowerBuilder Foundation Classes (PFC)
// source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//
//////////////////////////////////////////////////////////////////////////////
Integer li_numdetails
Integer li_i
Integer li_rc=1
// Validate references.
If IsNull(idw_requestor) Or Not IsValid(idw_requestor) Then Return FAILURE
// Bypass the datawindow if it is not marked as updateable.
If idw_Requestor.of_GetUpdateable ( ) Then
// Add the requesting datawindow to the array.
adw_sequence[UpperBound(adw_sequence) + 1] = idw_Requestor
End If
// Determine how many details are subordinate to the requestor.
li_numdetails = UpperBound ( idw_details )
// Loop through the valid details and call this function on the each detail.
For li_i = 1 to li_numdetails
If IsValid ( idw_details[li_i]) Then
If IsNull(idw_details[li_i].inv_Linkage) Or &
Not IsValid ( idw_details[li_i].inv_Linkage ) Then Return FAILURE
li_rc = idw_details[li_i].inv_Linkage.of_CreateUpdateSequence ( adw_sequence )
// If an error occurs, get out now.
If li_rc <> 1 Then Exit
End If
Next
Return li_rc
end function