LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using .net dataset object in LabView

Hi all!

Rather than directly writing SQL commands to/from a database as suggested using LabSQL http://www.jeffreytravis.com/lost/labsql.html or LabView connectivity toolkit https://www.ni.com/en/shop/labview/select-edition.html  I want to be able to call a webservice or a .dll (created using Visual Studio .NET) from LabView. 

The webservice or dll will have a method such as insertTestResult that will take a number of inputs passed to it from Labview, create a SQL command object and perform the INSERT command into the underlying database.  From what I have read this is perfectly doable, as it is straightforward to reference webservices or dll's from LabView.  It is also possible to reference .NET controls (as explained in other searches) https://www.ni.com/en/support/documentation/compatibility/09/national-instruments-product-compatibil... and http://forums.ni.com/ni/search?submitted=true&q=.net+dataset ) 

What I'm slightly unsure about is the ability of Labview to retrieve data back from the database via the webservice or dll.  A method such as getTestResult would return a DataSet object.  Can this object be used within LabView? E.g. binding it to a control such as a .NET datagrid or a LabView table.  Can we read through the cells of the dataset using a cursor or extracting items into an array?

I would appreciate any feedback.

Regards,

Ynyr

0 Kudos
Message 1 of 3
(3,211 Views)
I am trying to do something similar.  I am using LabWindows (with the enterprise connectivity toolkit) and I am trying to access a system.data.dataset object that is being returned when I call a webservice.  I am successfully calling the .NET dll function (it returns a success rc and I get the table name) but I'm not sure how to connect to this returned dataset as a database.  Is this even possible?  Is there some documentation anywhere?

Regards.
0 Kudos
Message 2 of 3
(3,151 Views)

Hi, .

Before LabVIEW can call a .NET web service, you must first convert the web service into a .NET assembly. There are two ways to accomplish this. 

Hope this helps.

Regards,

 
0 Kudos
Message 3 of 3
(3,106 Views)