of_Update


pfcmain.pbl   >   pfc_u_dw   >   of_Update   

Full name pfc_u_dw.of_Update
Access public
Extend of integer
Return value integer
Prototype public function integer of_Update(boolean,boolean,boolean,boolean,boolean)

Name Datatype
No Data

Name Datatype
li_rc integer

public function integer of_Update (boolean ab_accepttext, boolean ab_resetflag, boolean ab_insert, boolean ab_update, boolean ab_delete);//////////////////////////////////////////////////////////////////////////////
//	Public Function:	of_Update
//	Arguments:		ab_accepttext		Value specifying whether the DataWindow control should perform an
//												AcceptText prior to performing the update:
//						ab_resetflag		Value specifying whether DWControl should automatically 
//												reset the update flags.
//						ab_insert			Boolean stating if Inserts should be performed.
//						ab_update			Boolean stating if Updates should be performed.
//						ab_delete			Boolean stating if Deletes should be performed.
//	Returns:			Integer
//	 					1 = The update was successful
//						-1 = The update failed
//	Description:	Perform the Specific Update logic, but only perform the
//						requested SQL (insert, update, delete) statements.
// 					Note: Specific Update logic should be coded in descendant pfc_Update event.
//////////////////////////////////////////////////////////////////////////////
//	Rev. History	Version
//						6.0   Initial version
//////////////////////////////////////////////////////////////////////////////
//	Copyright © 1996-1999 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_rc

// Verify passed arguments.
if IsNull(ab_accepttext) or IsNull(ab_resetflag) &
	Or IsNull(ab_insert) or IsNull(ab_update) or IsNull(ab_delete) then return FAILURE

// Set the variable which determines which updates are allowed.
is_UpdatesAllowed = ""
if ab_insert then is_UpdatesAllowed += "I"
if ab_update then is_UpdatesAllowed += "U"
if ab_delete then is_UpdatesAllowed += "D"

// Perform the update.
li_rc = this.Event pfc_update (ab_accepttext, ab_resetflag)

// Reset the variable which determines which updates are allowed.
is_UpdatesAllowed = "IUD"

return li_rc
end function

     
Name Owner
pfc_n_cst_dwsrv_linkage.of_updatetopdownandbottomup pfc_n_cst_dwsrv_linkage
pfc_n_cst_dwsrv_linkage.of_updatebottomupandtopdown pfc_n_cst_dwsrv_linkage

     
Name Owner
systemfunctions.isnull systemfunctions
pfc_u_dw.pfc_update pfc_u_dw

     
Full name
No Data

     
Name Scope
No Data