Hello,
The loop seems to be correct, but the code is just overwriting the data in the
res5 variable each time instead of creating a new item. You'll want to change it to be something like the example below.
while(myDataReader.Read()) {
for (int i = 0; i < count; i++) {
Item temp = this.newItem("MIN_Delivered_Transaction");
temp.setProperty("f_dc", myDataReader.GetString(0));
temp.setProperty("f_trans_group", myDataReader.GetString(0));
...
res5.appendItem(temp); // Add a new item for each iteration of the loop
}
}
...
return res5;
This will return
res5 as a collection of items like you are expecting.
Chris
Christopher Gillis
Aras Labs Software Engineer