>>I am connecting to a webservice and getting an array of objects after passing in a SQL Select.
>>
>>The same technique will apply to any pulls I do from the backend. The number of "columns" in the returned data will vary
>>
>>I am trying to come up with a generic way to extract the data into anything that looks like a data cursor. I would prefer to do it without iterating the collection.
>>
>>object[] result = this.Proxy.runQuery(query, limit, offset);
>>
>>now I look at result in the watch window
>>
>>expanded each "row" is
>>
>>[0]
>>[1]
>>[2]
>>etc.
>>
>>now if I expand each of those I see
>>
>>item
>>itemfield
>>
>>Both have the same collection when expanded
>>
>>[0]
>>[1]
>>[2]
>>
>>etc for name and a value and type columnn ( all the types are java objects)
>>
>>I can put in result{0] and see that node but I can't figure out the rest
>>
>>result[0].item[0].value would seem logical to me but doesn't work
>>
>>I have a feeling this is a standard and there is a way to deal with this
>>
>>Anybody???
>>
>>How do I create a cursor
>>
>>with columns as represented in the second collection and all the values tostring with as many rows as result.count
>
>If I understood correctly then the 'column names' are repeated in every 'row' which seems wasteful - or am I wrong?
>IAC is the web service public and, if so, can you share the URL?
There are no column names in the object. Think of it as a treeview
Primary node has one node for each record. Node(2) has two nodes : item and itemField with identical structure and content
the item node has in the value column {object[n]} where n = the number of columns
the child nodes of item are identified by what looks like array elements : [0]. [1] ... [n-1]
each of those has in the value column (as seen in the debugger - not data column ) the actualy content of the datum.
http://dl.dropbox.com/u/1989748/ObjectArrayInWatchWindow.PNGHere's a screenshot of the watch window, since the webservice is not public and even getting this far with it has taken writing an fearsome C# wrapper for their API
TIA
Charles Hankey
Though a good deal is too strange to be believed, nothing is too strange to have happened.
- Thomas Hardy
Half the harm that is done in this world is due to people who want to feel important. They don't mean to do harm-- but the harm does not interest them. Or they do not see it, or they justify it because they are absorbed in the endless struggle to think well of themselves.
-- T. S. Eliot
Democracy is two wolves and a sheep voting on what to have for lunch.
Liberty is a well-armed sheep contesting the vote.
- Ben Franklin
Pardon him, Theodotus. He is a barbarian, and thinks that the customs of his tribe and island are the laws of nature.