LabVIEW Web UI Builder and Data Dashboard

cancel
Showing results for 
Search instead for 
Did you mean: 

vix file in UI builder doesn't recieve data from Webservice application that communicates with SQL server database

Solved!
Go to solution

I have created Web service VI ("Prikaz insolacije.vi") which has two input string terminals (FROM / TO) for dates and two output terminals for data (1-D array) collected from database (MS SQL server). This VI communicates with database using functions from database palette with appropriate DSN and SQL query. There are two tables with two data columns (Time and Insolation) in Database.

This VI works when you run it in Labview 2010, but when I used it as sub VI in UI builder it doesn't return any data.

 

Could you please help me find a solution. Is it possible to communicate with SQL server database this way or there is another way?

 

 

There are two attachmet files: Image of .vix file in UI builder and .vi file ("Prikaz insolacije.vi")

 

Please help me ASAP!

 

Thanks,

Ivan

 

Download All
0 Kudos
Message 1 of 6
(8,088 Views)

Hi Ivan,

 

Try wiring up the 'error out' terminal of the Web VI (in Web UI Builder) to the Unbundle Error node that's on the palette, then looking at the 'status' and 'source' outputs from that - is an error set? (If so what are the details from the 'source' output)?

 

Also you mention the VI works as expected in LabVIEW 2010 - you may also want to try accessing the web service URL directly from your browser, and seeing if the output is what you expect that way (without going through UI Builder).

0 Kudos
Message 2 of 6
(8,084 Views)

Status is False and source string is empty. It behaves like there is no code in VI.

I tried to access web service directly using following URL:
http://localhost:8080/WSPPSunce/Prikaz_insolacije/2009-11-05/2009-11-01

and it doesn' t work. It returns zeros.

The response is:

<Response><Terminal><Name>Insolacija</Name><Value><DimSize>0</DimSize></Value></Terminal><Terminal><Name>Vrijeme</Name><Value><DimSize>0</DimSize></Value></Terminal></Response>

0 Kudos
Message 3 of 6
(8,077 Views)

Hi Ivan,

 

A good way to debug Web Services is to add a breakpoint to the LabVIEW VI, so that when that code is requested and executed, the block diagram will open and you can examine the code more closely.

Take a look at the database VI's as they execute within the Web Service to see if they behave differently or generate an error.

 

Fred Visser -- SystemLink R&D -- National Instruments
0 Kudos
Message 4 of 6
(8,061 Views)
Solution
Accepted by topic author Ivan1985

I've found the solution Smiley Happy Problem was in DSN. I' ve been using User DSN instead of System DSN.

It' s important to create System DSN if you want your web service VI to communicate with database.

 

P.S. Please put bundle function, timestamp format and XY graph in web UI builder. It's complicated to plot data with datetime on X axis without them.

0 Kudos
Message 5 of 6
(8,048 Views)

I believe I am having a similar problem.  Can you explain in a little more detail what you did to fix the problem?  Are you using a file dsn or a udl to connect?  I am getting the "0x80004005 Exception occured in Microsoft OLE DB Provider for ODBC Drivers: General error: Invalid file dsn" or "Error: 0x80030003Exception occured in Microsoft OLE DB Service Components: The path could not be found" 

0 Kudos
Message 6 of 6
(7,910 Views)