SetVariable
Posted: Thu Oct 20, 2011 9:58 am
I am trying to get a record count from a file using a query and SetVariable task. I am using a simple record count as shown below:
<sql label="Connect to DB" resourceId="LOCAL" version="1.0">
<query label="Select Data" outputVariable="records">
<statement>Select count(*) From filelib.testfile </statement> </query>
</sql>
I then add a SetVariable task and my system places the following in the XML:
<setVariable name="foundcount" value="${records[1]}" version="2.0"
When I run the project I get the following error:
[8099 - setVariable] An unexpected error occurred. Cursor position not valid.
If I change the SetVariable statement to version 1.0 as shown below, it works correctly
<setVariable name="foundcount" value="${records[1]}" version="1.0" />
I have been unable to find anything that tells me what the correct syntax is for Version 2.0
<sql label="Connect to DB" resourceId="LOCAL" version="1.0">
<query label="Select Data" outputVariable="records">
<statement>Select count(*) From filelib.testfile </statement> </query>
</sql>
I then add a SetVariable task and my system places the following in the XML:
<setVariable name="foundcount" value="${records[1]}" version="2.0"
When I run the project I get the following error:
[8099 - setVariable] An unexpected error occurred. Cursor position not valid.
If I change the SetVariable statement to version 1.0 as shown below, it works correctly
<setVariable name="foundcount" value="${records[1]}" version="1.0" />
I have been unable to find anything that tells me what the correct syntax is for Version 2.0