Fitnesse和dbFit:无法在商店查询中使用变量

时间:2015-02-19 11:14:39

标签: fitnesse dbfit

!|DatabaseEnvironment|ORACLE|
|Connect|${HOSTNAME}|${USERNAME}|${PASSWORD}|
|set option|bind symbols|false|


!|Query|!-select acct_id ts from dual-!|
|acct_id?|
|>>acct_id|

|Set Parameter|acct_id|<<acct_id|

!|query|SELECT * from table1 where id=:acct_id|
|accr_id?|

收到如下错误:

ava.lang.Error: java.sql.SQLException: Missing IN or OUT parameter at index:: 1
at dbfit.fixture.StoreQuery.doTable(StoreQuery.java:48)
at fit.Fixture.interpretFollowingTables(Fixture.java:120)
at fit.Fixture.interpretTables(Fixture.java:106)
at fit.Fixture.doTables(Fixture.java:80)
at fit.FitServer.process(FitServer.java:81)
at fit.FitServer.run(FitServer.java:56)
at fit.FitServer.main(FitServer.java:41)

有没有办法让它发挥作用?

1 个答案:

答案 0 :(得分:1)

使用&#34;:vaiableName&#34;在脚本中使用变量时那么你需要将绑定符号设置为true。

| set option | bind symbols | true |