Jump to content

Get the enumerator from a collection


Recommended Posts

I have created a Web service in VB.NET. This service returns a dataset. To call it from within Labview i created a .NET assembly that actualy calls the web service.

So far i can get the name o f the returned table (the table that the .net assembly returns after it calls my web service), but i can't iterate through it's datarows and columns.

For example, i can get the number of the columns that a datarow has, but i don't know how to get the column names for this datarow, because i can't get the enumerator for the columns collection. The GetEnumerator has no properties or methods for iterating.

Anybody has any ideas or have tried something similar?

(This has also been posted in NI forums, sorry but i'm in a hurry for an answer)

Link to comment

The following is the answer from the NI forums:

"I may have made some headway in getting the GetEnumerator class working. Go to Tools>>Advanced>>.NET Assembly References and you'll need to add the MSCORLIB assembly. It should be located in the path WINDOWS\Microsoft.NET\Framework\v1.1.4322, although my version may be different from yours. Once the assembly is added, click OK and restart LabVIEW. Doing this appears to give you access to the Enumerator methods for a Data Column Collection.

Best of luck!

E. Sulzer

Applications Engineer

National Instruments "

And that worked for me!

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.