LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting to a Remote SQL Database Using the LabVIEW NXG

Solved!
Go to solution

Hi,

I want Connect to a Remote SQL Database Using LabVIEW NXG, i know that there is no direct database communication functions.

Are there some options utilizing other functions within LabVIEW in conjunction with Web VIs, or exemple? 

0 Kudos
Message 1 of 4
(2,548 Views)
Solution
Accepted by topic author bill0w

Hello there. Posting a suggestion by Brandon Nguyen.

 

We don't currently have a direct to communicate with databases through Web VIs, but here are a few options:

 

1. Create a web service that handles the database communication, then use the WebVI to send HTTP requests to the web service to update/acquire database information. Kinda like this:

 

db+web.png

 

They can create the web service through LabVIEW (Current-Gen, not NXG) if they have that. We have an existing example for communicating between LabVIEW CG Web Services and Web VIs:

 

webvi-examples/Call3rdPartyWebService at master · ni/webvi-examples · GitHub 

 

Keep in mind that while these are two separate entities for lack of a better word (a Web Service and a Web VI), they can still have everything in one 'spot' by hosting the web service, and using the Web VI build output as static files in the web service (these links are LabVIEW web service specific, but it should be the same idea with any other web service).

 

2. A bit of an expansion on the last suggestion, but use an existing web service that already talks to a database. If using SQL, we have some options here that should work:

PostgRest: GitHub - PostgREST/postgrest: REST API for any Postgres database 

restSQL: restSQL Overview 

 

And the idea is the same. Set up the web service that talks to the database, and use the HTTP VIs to get your Web VI to talk to it.

Message 2 of 4
(2,486 Views)

any idea when DB toolkit will be available?

 

http://www.krzysztofszewczyk.net
0 Kudos
Message 3 of 4
(2,414 Views)

Hi krzysztofszewczyk,

 

We're including the Database Connectivity API in the next release of LabVIEW NXG Professional, expected by the end of the year, so stay tuned!

 

Deborah Burke
NI Hardware and Drivers Product Manager
Certified LabVIEW Architect
0 Kudos
Message 4 of 4
(2,380 Views)