Posted: Fri Mar 24, 2006 6:55 am Post subject: Storing an array in LocalEnvironment
Apprentice
Joined: 24 May 2002 Posts: 25
Hi,
In a compute node, I am trying to select certain columns from a table & store the resultset into the LocalEnvironment. Is there a way that I can store an array in LocalEnvironment.Variables ?
I am using MessageBroker 5.0
This was the piece of code that I was trying :
CREATE FIELD OutputLocalEnvironment.Variables.QueueNames[];
SET OutputLocalEnvironment.Variables.QueueNames[] = (SELECT R.QUEUE_NAME FROM Database.TABLE1 AS R WHERE R.PROCESS_NAME = processName);
But I am getting an error :
The dynamic field reference supplied to the CREATE statement does not resolve to a non-list field in a modifiable message tree.
The dynamic field reference supplied to the CREATE statement must resolve to a non-list field in a modifiable message tree.
Ensure that only non-list references to modifiable trees are passed to the CREATE statement.
Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT.
Try:
Code:
CREATE FIELD OutputLocalEnvironment.Variables.QueueNames;
SET OutputLocalEnvironment.Variables.QueueNames[] = (SELECT R.QUEUE_NAME FROM Database.TABLE1 AS R WHERE R.PROCESS_NAME = processName);
or
Code:
SET OutputLocalEnvironment.Variables.QueueNames[] = (SELECT R.QUEUE_NAME FROM Database.TABLE1 AS R WHERE R.PROCESS_NAME = processName);
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum