Example Code

Get Data from a Database

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

 

Overview
Use a simple VI to get data from a Database either as a table or by field.


Description
This example gets data from a Database and displays it in LabVIEW as a table. It also allows to fetch a specific field.


Requirements

  • LabVIEW 2012 (or compatible)
  • LabVIEW DSC 2012
  • LabVIEW Database Connectivity Toolkit


Steps to Implement or Execute Code

  1. Run VI
  2. Enter 233311 as the Customer Number and click Get Name, verify that the name field reads "Joe"
  3. Click Get Table and notice all elements included in the table "fetch data"

 

Additional Information or References
VI Block Diagram

 Block Diagram.png

 

 **This document has been updated to meet the current required format for the NI Code Exchange.**

 

 

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.