of_unlinkdetail


pfcdwsrv.pbl   >   pfc_n_cst_dwsrv_linkage   >   of_unlinkdetail   

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

Name Datatype
No Data

Name Datatype
ldw_notvalid u_dw
li_i Integer
li_numdetails Integer

public function integer of_unlinkdetail (u_dw adw_detail);//////////////////////////////////////////////////////////////////////////////
//
//	Function:  		of_UnlinkDetail
//
//	Access:    		Public
//
//	Arguments:
//   adw_detail: 	The detail datawindow reference
//
//	Returns:   		Integer
//   					1 if it succeeds and -1 if an error occurs.
//
//	Description:
//	Sets this master's detail reference to null, thus unlinking the datawindow.
// Called internally from 'of_ResetMaster'
//
//	Note:
//	This function is not typically called by the developer.  
// To unregister a detail datawindow, from the detail dw call of_ResetMaster instead.
//
//////////////////////////////////////////////////////////////////////////////
//
//	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
u_dw		ldw_notvalid	//Invalid detail reference

// If the passed detail is not valid, then return error.
If IsNull(adw_detail) Or Not IsValid(adw_detail) Then 
	Return -1
End If

// Loop through the valid details attached and reset the detail reference.
li_numdetails = UpperBound ( idw_details ) 
For li_i = 1 to li_numdetails
	If idw_details[li_i] = adw_detail Then 
		// Invalidate the detail reference.
		idw_details[li_i] = ldw_notvalid
		Return 1
	End If
Next 

Return -1


end function

     
Name Owner
pfc_n_cst_dwsrv_linkage.of_resetmaster pfc_n_cst_dwsrv_linkage

     
Name Owner
systemfunctions.isnull systemfunctions
systemfunctions.isvalid systemfunctions
systemfunctions.upperbound systemfunctions

     
Full name
No Data

     
Name Scope
No Data