如何获取参数值并分配给源块中的代理
我有一个带有参数的代理accountno
,开始日期
,end_date
,value
type> type> type_of_account ,<代码> cycle_time 。 对于AccountNo
,我已经根据实际数据创建了一个自定义分发。因此,当在源块上生成代理时,将分配一个accountno
值。现在,在代理离开源块之前,我想从SQL表更新其他参数 SQL表具有accountno
,<代码>值,type_of_account ,cycle_time_time
字段。 在源处的退出时,我想更新以下代理参数:
agent.start_date = date()
agent.end_date = agent.start_date+ cypec_time+ cypec_time
(来自同一代理的SQL表基于同一帐户编号)agent.type_of_acount = type_of_account
(来自SQL表,基于同一帐户编号的相应值) 如何从SQL表分配参数值?我试过 编写查询以从数据库获得值。
。
((MyAgent1)agent).start_time=date();
double a= ((MyAgent1)agent).actno;
double b = selectFirstValue(false, double.class, "SELECT cycle_time FROM sheet1 WHERE actno = a;");
它正在投掷错误
用户缺乏未找到的特权或对象
是否有一种更新参数值的好方法?
I have an agent with parameters AccountNo
, start date
,end_date
,Value
,type_of_account
,cycle_time
.
For AccountNo
I have created a custom distribution based on the actual data. So when an agent is generated at source block it will be assigned an AccountNo
value. Now before agent leaves source block i want to update other parameter from the SQL table
SQL table has AccountNo
, Value,type_of_account
, Cycle_time
fields.
On exit at source I want to update the agent parameters as below:
agent.start_date=date()
agent.end_date= agent.start_date+ cycle_time
(from SQL table for same agent based on same account no)agent.type_of_acount=type_of_account
(from sql table with corresponding value based on same account No)
How I can assign the parameter values from SQL table? I tried
writing query to get the value from db.
.
((MyAgent1)agent).start_time=date();
double a= ((MyAgent1)agent).actno;
double b = selectFirstValue(false, double.class, "SELECT cycle_time FROM sheet1 WHERE actno = a;");
It is throwing error
user lacks privilege or object not found
is there a good way to update parameter values ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论