Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Extract row-column from array of objects
Message
From
28/04/2011 03:58:06
 
 
To
27/04/2011 22:49:00
General information
Forum:
ASP.NET
Category:
LINQ
Environment versions
Environment:
C# 4.0
Miscellaneous
Thread ID:
01508607
Message ID:
01508618
Views:
49
>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?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform