////////////////////////////////////////////////////////////////////////////// //Public Function: of_DWArguments (Format 1) //Arguments:adwc_obj: DataWindow child to determine if there are arguments //as_argnames[]: A string array (by reference) to hold the argument names //as_argdatatypes[]: A string array (by reference) to hold argument datatypes //Returns: Integer -The number of arguments found //Description: Determines if a DataWindowChild has arguments and what they are. //Note: This function has a (Format 2) which is very similar. ////////////////////////////////////////////////////////////////////////////// //Rev. HistoryVersion //5.0 Initial version //5.0.01 Fixed bug so that reference arguments are populated correctly //5.0.01 Function returns -1 if DataWindowChild reference is not valid // 5.0.02 Added Stored Procedures support. // 5.0.04 Fixed bug which prevented the looping around multiple arguments. //8.0Switched to use new Describe String to get arguments //9.0Fix CR305452 ////////////////////////////////////////////////////////////////////////////// //Copyright ?1996-2003 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_dwargs, ls_dwargswithtype[], ls_args[], ls_types[] long ll_a, ll_args, ll_pos n_cst_string lnv_string
// Check arguments
if IsNull (adwc_obj) or not IsValid (adwc_obj) then return -1 end if
For ll_a = 1 to ll_args ll_pos = Pos ( ls_dwargswithtype[ll_a], "~t", 1 ) If ll_pos > 0 Then as_argnames[UpperBound(as_argnames)+1] = Left ( ls_dwargswithtype[ll_a], ll_pos - 1 ) as_argdatatypes[UpperBound(as_argdatatypes)+1] = Mid ( ls_dwargswithtype[ll_a], ll_pos + 1 ) End If Next