Roger,
>From reading your problem description I BELIEVE that one of the issues you
are having is that your are trying to use stem variables in place of array
objects. An array in ooRexx is an object of the .Array class. So the
resulting 'data' variable in example "data = dbConn~exec(sql,.true)" is in
fact an array-of-arrays. Therefore data[1] is an array of column names,
which could be logically created using a statement such as
data = .Array~new
data[1] = .Array~of('col1','col2','col3')
Then data[2] through data~items also contain arrays with the actual data,
logically created as this:
data[2] = .Array~of(col1row1,col2row1,col3row1)
data[3] = .Array~of(col1row2,col2row2,col3row2)
etc
So building the columns is a simple matter of scanning the array in
data[1], for example:
width=50
do i = 1 to data[1]~items
lv~insertColumn(i-1, data[1][i], width)
end
And to insert the data you can use addRowFromArray:
do i = 2 to data~items
lv~addRowFromArray(data[i])
end
If you are not familiar with the collection classes in ooRexx I suggest you
read up on these in the ooRexx documentation.
I hope this can be of some help.
Staffan
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Oorexx-users mailing list
Oorexx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-users