|
of_resetmaster
|
|
Full name
|
pfc_n_cst_dwsrv_linkage.of_resetmaster
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_resetmaster()
|
Name
|
Datatype
|
ldw_notvalid
|
u_dw
|
li_i
|
Integer
|
li_numdetails
|
Integer
|
li_rc
|
Integer
|
public function integer of_resetmaster ();//////////////////////////////////////////////////////////////////////////////
//
// Function: of_ResetMaster
//
// Access: Public
//
// Arguments: None
//
// Returns: Integer
// 1 if it succeeds and -1 if an error occurs.
//
// Description:
// Reset the master datawindow. (detail to master reference)
// Reset the detail datawindow on the master. (master to detail reference)
//
// *Note: This function should only be called from subordinate datawindows.
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 6.0 Initial version - Replaces obsoleted function of_UnLink(...)
// 6.0 Corrected - function would unregister more than requested.
//
//////////////////////////////////////////////////////////////////////////////
//
// 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
u_dw ldw_notvalid // Invalid master reference
// This operation is not valid on a root datawindow.
If of_IsRoot() Then Return FAILURE
// Verify that the master has started the linkage service.
If IsNull(idw_master.inv_Linkage) Or &
Not IsValid ( idw_master.inv_Linkage ) Then Return FAILURE
// Tell the master to unregister the master to detail reference.
If idw_master.inv_Linkage.of_UnlinkDetail ( idw_Requestor ) <> 1 Then
Return FAILURE
End If
// Unregister the detail to master reference.
idw_master = ldw_notvalid
Return li_rc
end function