of_modify


pfcdwsrv.pbl   >   pfc_n_cst_dwsrv   >   of_modify   

Full name pfc_n_cst_dwsrv.of_modify
Access public
Extend of string
Return value string
Prototype public function string of_modify(string,string,string,string,boolean)

Name Datatype
No Data

Name Datatype
li_cnt integer
li_col_count integer
ls_modify string
ls_objects string[]
ls_rc string

public function string of_modify (string as_attribute, string as_value, string as_objtype, string as_band, boolean ab_visible_only);//////////////////////////////////////////////////////////////////////////////
//
//	Function:  of_Modify (FORMAT 3)
//
//	Access:    Public 
//
//	Arguments:
//   as_attribute 	:  The name of the datawindow attribute to be modified
//   as_value		 	:  The new value of the datawindow attribute
//   as_objtype	  	:  The type of objects to modify (* for all, others defined
//							   by the object .TYPE attribute)
//   as_band 			:  The dw band to modify objects in (* for all) 
//								 Valid bands: header, detail, footer, summary
//								 header.#, trailer.#
//   ab_visibleonly	:  TRUE  - modify only the visible objects,
//							   FALSE - modify visible and non-visible objects
//
//	Returns:  String
//	  The return string of Modify.  When empty, indicates success.
//
//	Description:  Modifies the specified attribute for all columns
//
//////////////////////////////////////////////////////////////////////////////
//
//	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.
//
//////////////////////////////////////////////////////////////////////////////
string ls_modify, ls_rc, ls_objects[]
integer	li_cnt
integer	li_col_count

/* Get the count and names of columns on the datawindow */
li_col_count = of_GetObjects (ls_objects, as_objtype, as_band, ab_visible_only )

IF li_col_count > 0 THEN

	/*  Modify all columns on the datawindow */
	FOR li_cnt = 1 to li_col_count
		ls_modify = ls_modify + ls_objects[li_cnt] + "." + as_attribute + "= " + as_value + " " 
	NEXT 

	IF idw_Requestor.Modify ( ls_modify ) <> "" THEN 
		/*  If Modify fails, then try quoting the attribute value */ 
		as_value = "'" + as_value + "'"
		ls_modify = ""
		FOR li_cnt = 1 to li_col_count
			ls_modify = ls_modify + ls_objects[li_cnt] + "." + as_attribute + "= " + as_value + " " 
		NEXT 
		ls_rc = idw_Requestor.Modify ( ls_modify ) 
	END IF 

ELSE /* Single column to Modify */
	ls_modify = as_objtype + "." + as_attribute + "= " + as_value 
	IF idw_Requestor.Modify ( ls_modify ) <> "" THEN 
		as_value = "'" + as_value + "'"
		ls_modify = as_objtype + "." + as_attribute + "= " + as_value 
		ls_rc = idw_Requestor.Modify ( ls_modify ) 
	END IF 

END IF

Return ls_rc
end function

     
Name Owner
pfc_n_cst_dwsrv.of_Modify pfc_n_cst_dwsrv
pfc_n_cst_dwsrv.of_Modify pfc_n_cst_dwsrv
pfc_w_selection.open pfc_w_selection
pfc_w_restorerow.open pfc_w_restorerow

     
Name Owner
datawindow.modify datawindow
pfc_n_cst_dwsrv.of_getobjects pfc_n_cst_dwsrv

     
Full name
No Data

     
Name Scope
No Data