|
of_updatetopdown
|
|
Full name
|
pfc_n_cst_dwsrv_linkage.of_updatetopdown
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_updatetopdown()
|
Name
|
Datatype
|
ldw_updatedw
|
u_dw[]
|
li_i
|
Integer
|
li_max
|
Integer
|
ls_sqlspyheading
|
String
|
ls_sqlspymessage
|
String
|
public function integer of_updatetopdown ();//////////////////////////////////////////////////////////////////////////////
//
// Function: of_UpdateTopDown
//
// Access: Public
//
// Arguments: None
//
// Returns: Integer
// 1 if it succeeds and -1 if an error occurs.
//
// Description: Updates the datawindows in the linked chain, starting with
// the top-level datawindow and going down the chain.
//
// Note: This function is not typically called by the developer.
// To cause an update from the top-down, make sure that
// ii_updatestyle is set and then call of_update.
//
//////////////////////////////////////////////////////////////////////////////
//
// 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_i
Integer li_max
String ls_sqlspyheading
String ls_sqlspymessage
u_dw ldw_updatedw[]
// Create an array of the linked datawindows for update.
If of_CreateUpdateSequence ( ldw_updatedw ) <> 1 Then Return FAILURE
//If available notify the SQLSpy service.
If IsValid(gnv_app.inv_debug) Then
If IsValid(gnv_app.inv_debug.inv_sqlspy) Then
//Create the heading and message for the SQLSpy.
ls_sqlspyheading = idw_requestor.ClassName() + '.Linkage'
ls_sqlspymessage = 'Update single-pass TopDown (inserts/updates/deletes)'
//Send the information to the service for processing.
gnv_app.inv_debug.inv_sqlspy.of_sqlSyntax &
(ls_sqlspyheading, '/*** ' + ls_sqlspymessage + ' ***/')
End If
End If
// Loop thru the array.
li_max = UpperBound ( ldw_updatedw )
For li_i = 1 to li_max
// Update the datawindow.
If ldw_updatedw[li_i].Event pfc_update ( FALSE, False ) <> 1 Then Return FAILURE
Next
Return 1
end function