怎么获得retrieve的参数

如何获得retrieve的参数
一个数据窗口设置了retrieve的参数,是数值型,我想在打开这个数据窗口时,获取传过来的这个值,请问怎么能取得,谢谢!!

------解决方案--------------------
说的不清楚,你怎么传递的参数啊,定义相同类型的变量 ,接收啊
------解决方案--------------------
用变量不是可以实现么?
------解决方案--------------------
在sqlpreview事件中进行判断
当sqlpreviewtype = previewselect! 时,提取SQLSyntax, 然后跟dw_1.getssqlselect()的串进行比对
------解决方案--------------------
建DW 对象的时候,试一下这样写SQL语句:
select :as_arg as col0, col1, col2, ....
from table 
where colx=:as_arg

这样,检索出有数据的时候,其中col0 列的数据就是传入的参数。

------解决方案--------------------
方法二 到grid的SQL界面 选design-->retrieve argument 然后在下面写SQL就OK啦
探讨
建DW 对象的时候,试一下这样写SQL语句:
select :as_arg as col0, col1, col2, ....
from table
where colx=:as_arg

这样,检索出有数据的时候,其中col0 列的数据就是传入的参数。

------解决方案--------------------
dw_1.describe("evaluate('parm1',1)")
------解决方案--------------------
C# code
0000000000000000000000000

------解决方案--------------------
[code=Delphi(Pascal)][/code][code=XML][/code][code=JScript][/code][code=Java][/code][code=JScript][/code][code=Delphi(Pascal)][/code]
------解决方案--------------------
既然是用retrieve获取数据,那么你传过去的参数你不会知道吗?用个变量保存起来不就可以了
------解决方案--------------------
探讨
建DW 对象的时候,试一下这样写SQL语句:
select :as_arg as col0, col1, col2, ....
from table
where colx=:as_arg

这样,检索出有数据的时候,其中col0 列的数据就是传入的参数。

------解决方案--------------------
看看PFC是如何解决的:

//////////////////////////////////////////////////////////////////////////////
// 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. History Version
// 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.0 Switched to use new Describe String to get arguments
// 9.0 Fix 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