of_Register


pfcapsrv.pbl   >   pfc_n_cst_lvsrv_datasource   >   of_Register   

Full name pfc_n_cst_lvsrv_datasource.of_Register
Access public
Extend of integer
Return value integer
Prototype public function integer of_Register(string,datawindow)

Name Datatype
No Data

Name Datatype
lds_control datastore
ldw_control datawindow
lpo_obj powerobject[]
ls_dwobjectname string
ls_importfile string
ls_sql string
ltr_obj n_tr

public function integer of_Register (string as_labelcolumn, datawindow adw_control);//////////////////////////////////////////////////////////////////////////////
//	Public Function:	of_Register
//	Arguments:		as_LabelColumn		The column in the DataWindow object to display. 
//						adw_control			The DataWindow control to be used for the data source.
//	Returns:  		integer
//	 					1 = the data source was added successfully
//						-1 = argument validation error
//						-2 = the DataWindow object did not have any key columns assigned
//						-3 = no DataWindow object was provided
//						-4 = one of the columns provided did not exist
//						-5 = SetTransObject failed for the data source
// 					-6 = Error from Cache Registration
//	Description:	Register a datawindow control as a data source for the ListView.  
//						The data source will be linked to the ListView and used to populate.
//////////////////////////////////////////////////////////////////////////////
//	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.
//////////////////////////////////////////////////////////////////////////////
string		ls_dwobjectname
string		ls_sql
string		ls_importfile
powerobject lpo_obj[]
datawindow	ldw_control
datastore	lds_control
n_tr			ltr_obj

// Check Arguments
if IsNull(adw_control) or not IsValid(adw_control) then return -1
if Len(adw_control.DataObject) = 0 then return -1

// Set Null to indicate non-use
SetNull(ls_sql)
SetNull(ldw_control)
SetNull(lds_control)
SetNull(ls_importfile)

// Populate the argument with the desired DataObject.
ls_dwobjectname = adw_control.DataObject

return of_Register(as_LabelColumn, ls_dwobjectname, ltr_obj, inv_Cache.DATAWINDOWCONTROL, &
					 	 ls_sql, lpo_obj, adw_control, lds_control, ls_importfile)
end function

     
Name Owner
No Data

     
Name Owner
systemfunctions.isnull systemfunctions
systemfunctions.isvalid systemfunctions
systemfunctions.len systemfunctions
systemfunctions.setnull systemfunctions
pfc_n_cst_lvsrv_datasource.of_Register pfc_n_cst_lvsrv_datasource

     
Full name
No Data

     
Name Scope
No Data