of_getregisterable


pfcdwsrv.pbl   >   pfc_n_cst_dssrv_multitable   >   of_getregisterable   

Full name pfc_n_cst_dssrv_multitable.of_getregisterable
Access public
Extend of integer
Return value integer
Prototype public function integer of_getregisterable(ref string[])

Name Datatype
No Data

Name Datatype
li_cnt integer
li_colcount integer
li_upper integer
lnv_string n_cst_string
ls_colattributes string
ls_colname string
ls_dbname string
ls_empty string[]
ls_table string

public function integer of_getregisterable (ref string as_tablecolumn[]);//////////////////////////////////////////////////////////////////////////////
//
//	Function:  		of_GetRegisterable
//
//	Access:  		public
//
//	Arguments:
//	as_tablecolumn[] (By Ref.)  All table/columns belonging to the requestor 
//		which	could be registered.
//
//	Returns:  		Integer
//	 The table/column count.
//	-1 if an error is encountered.
//
//	Description:
//	Determines all table/columns belonging to the requestor which could be 
//	registered.
//
//////////////////////////////////////////////////////////////////////////////
//
//	Revision 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_colcount
integer	li_cnt
integer  li_upper
string	ls_colname
string	ls_colattributes
string	ls_dbname
string	ls_table
string 	ls_empty[]
n_cst_string lnv_string

// Clear the reference variable.
as_tablecolumn = ls_empty

// Validate required references.
If IsNull(ids_requestor) or Not IsValid(ids_requestor) Then Return -1

// Get the number of columns in the datawindow object
li_colcount = integer(ids_requestor.object.datawindow.Column.Count)

// Loop around all columns looking for dddw or ddlb columns.
For li_cnt=1 to li_colcount
	// Get the column name.
	ls_colname = ids_requestor.Describe("#"+string(li_cnt)+".Name")
	
	// Get the Table name.
	ls_dbname = ids_requestor.Describe(ls_colname+".dbName")
	ls_table = lnv_string.of_GetToken(ls_dbname, '.')
	
	// Create the TableColumn value.
	li_upper = UpperBound(as_tablecolumn) + 1
	as_tablecolumn[li_upper] = ls_table+'.'+ls_colname
Next

Return UpperBound(as_tablecolumn)
end function

     
Name Owner
No Data

     
Name Owner
datastore.describe datastore
systemfunctions.integer systemfunctions
systemfunctions.isnull systemfunctions
systemfunctions.isvalid systemfunctions
systemfunctions.string systemfunctions
systemfunctions.upperbound systemfunctions
pfc_n_cst_string.of_gettoken pfc_n_cst_string

     
Full name
No Data

     
Name Scope
No Data