|
of_storeupdatesettings
|
|
Full name
|
pfc_n_cst_dssrv_multitable.of_storeupdatesettings
|
Access
|
protected
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
protected function integer of_storeupdatesettings(ref n_cst_dssrv_multitableattrib)
|
Name
|
Datatype
|
li_colidx
|
integer
|
li_numcols
|
integer
|
ls_column
|
string
|
protected function integer of_storeupdatesettings (ref n_cst_dssrv_multitableattrib anv_originalupdate);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_StoreUpdateSettings
//
// Access: Protected
//
// Arguments:
// anv_originalupdate Original Update information (passed by reference).
//
// Returns: Integer
// 1 = The Update Characteristics were successfully stored.
// -1 = An error was encountered.
//
// Description: To store the datawindow's Update Characteristics for
// later restoration.
// Called by of_update().
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 5.0 Initial version
// 7.0 Argument datatype changed from os_updcharacteristics to n_cst_dssrv_multitableattrib type
// 7.0 Argument name changed from astr_originalupdate to anv_originalupdate
//
//////////////////////////////////////////////////////////////////////////////
//
// 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_numcols
integer li_colidx
string ls_column
// Check the datawindow reference.
If IsNull(ids_requestor) Or Not IsValid(ids_requestor) Then Return -1
// Store all Update Table.
anv_originalupdate.s_updatetable = &
ids_requestor.Describe ( "DataWindow.Table.UpdateTable" )
// Store the Update Where statement.
anv_originalupdate.i_whereoption = &
Integer ( ids_requestor.Describe ( "DataWindow.Table.UpdateWhere" ) )
// Store the Update Key In Place flag.
IF Lower(ids_requestor.Describe("DataWindow.Table.UpdateKeyInPlace")) = "yes" THEN
anv_originalupdate.b_keyupdateinplace = TRUE
ELSE
anv_originalupdate.b_keyupdateinplace = FALSE
END IF
// Loop around all columns of the datawindow.
// Store all Updateable and Key columns.
li_numcols = Integer (ids_requestor.Describe ( "DataWindow.Column.Count" ))
FOR li_colidx = 1 to li_numcols
// Get the column name.
ls_column = ids_requestor.Describe ( "#" + String(li_colidx) + ".Name" )
//If a column was set as updateable, then store it in the attribute class.
IF Lower(ids_requestor.Describe (ls_column + ".Update" )) = "yes" THEN
anv_originalupdate.s_updatecolumns[UpperBound(anv_originalupdate.s_updatecolumns)+1] = ls_column
END IF
//If a column was set as a key column, then store it in the attribute class.
IF Lower(ids_requestor.Describe (ls_column + ".Key" )) = "yes" THEN
anv_originalupdate.s_keycolumns[UpperBound(anv_originalupdate.s_keycolumns)+1] = ls_column
END IF
NEXT
Return 1
end function
Name
|
Owner
|
datastore.describe |
datastore
|
systemfunctions.integer |
systemfunctions
|
systemfunctions.isnull |
systemfunctions
|
systemfunctions.isvalid |
systemfunctions
|
systemfunctions.lower |
systemfunctions
|
systemfunctions.string |
systemfunctions
|
systemfunctions.upperbound |
systemfunctions
|