of_getupdatespending


pfcdwsrv.pbl   >   pfc_n_cst_dwsrv_linkage   >   of_getupdatespending   

Full name pfc_n_cst_dwsrv_linkage.of_getupdatespending
Access public
Extend of integer
Return value integer
Prototype public function integer of_getupdatespending()

Name Datatype
No Data

Name Datatype
li_i Integer
li_numdetails Integer
li_rc Integer
li_updpending Integer

public function integer of_getupdatespending ();//////////////////////////////////////////////////////////////////////////////
//
//	Function:  	of_GetUpdatesPending
//
//	Access:    	Public
//
//	Arguments: 	None
//
//	Returns:  	Integer
// 				 1 = Updates pending within the datawindow chain.
// 				 0 = No updates pending within the datawindow chain.
//					-1 = Error
//
//	Description:  Determines if updates are pending in the linked datawindow chain.
//
//	   *Note:	Typically called from the root datawindow to affect all 
//					datawindows in the chain, but may be started anywhere in the chain.
//
//////////////////////////////////////////////////////////////////////////////
//
//	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, li_i, li_rc=0, li_updpending=0

// Bypass the datawindow if it is NOT marked as updateable.
If idw_Requestor.of_GetUpdateable ( ) Then 
	// Check for any Pending Updates.
	If idw_Requestor.Event pfc_UpdatesPending() > 0 Then 
		// Store that there is at least one datawindow that has Updates Pending.
		li_updpending = 1
	End If 
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_GetUpdatesPending()
		If li_rc < 0 Then 
			// If an error occurs, then exit. 	
			Return li_rc
		ElseIf li_rc >= 1 Then 
			// Store that there is at least one datawindow that has Updates Pending.
			li_updpending = 1
		End If
	End If 
Next 

Return li_updpending
end function

     
Name Owner
pfc_n_cst_dwsrv_linkage.of_getupdatespending pfc_n_cst_dwsrv_linkage
pfc_n_cst_dwsrv_linkage.of_save pfc_n_cst_dwsrv_linkage
pfc_u_dw.of_UpdatesPending pfc_u_dw

     
Name Owner
systemfunctions.isnull systemfunctions
systemfunctions.isvalid systemfunctions
systemfunctions.upperbound systemfunctions
pfc_n_cst_dwsrv_linkage.of_getupdatespending pfc_n_cst_dwsrv_linkage
pfc_u_dw.of_GetUpdateable pfc_u_dw
pfc_u_dw.pfc_updatespending pfc_u_dw

     
Full name
No Data

     
Name Scope
No Data