|
of_getregisterablecolumn
|
|
Full name
|
pfc_n_cst_dwsrv_multitable.of_getregisterablecolumn
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_getregisterablecolumn(string,ref string[])
|
Name
|
Datatype
|
li_cnt
|
integer
|
li_colcount
|
integer
|
li_upper
|
integer
|
lnv_string
|
n_cst_string
|
ls_colname
|
string
|
ls_dbname
|
string
|
ls_empty
|
string[]
|
ls_table
|
string
|
public function integer of_getregisterablecolumn (string as_table, ref string as_column[]);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_GetRegisterableColumn
//
// Access: public
//
// Arguments:
// as_table The table for which the columns are wanted.
// as_column[] (By Ref.) All columns belonging to the table passed in which
// could be registered.
//
// Returns: Integer
// The column count.
// -1 if an error is encountered.
//
// Description:
// Determines all columns belonging to the passed in table 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_dbname
string ls_table
string ls_empty[]
n_cst_string lnv_string
// Clear the reference variable.
as_column = ls_empty
// Validate required references.
If IsNull(idw_requestor) or Not IsValid(idw_requestor) Then Return -1
// Get the number of columns in the datawindow object
li_colcount = integer(idw_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 = idw_requestor.Describe("#"+string(li_cnt)+".Name")
// Get the Table name.
ls_dbname = idw_requestor.Describe(ls_colname+".dbName")
ls_table = lnv_string.of_GetToken(ls_dbname, '.')
// Determine if this table matches the desired table.
If ls_table = as_table Then
li_upper = UpperBound(as_column) + 1
as_column[li_upper] = ls_colname
End If
Next
Return UpperBound(as_column)
end function
Name
|
Owner
|
datawindow.describe |
datawindow
|
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
|