Example Code

Get Record Set from Database and Include Column Headers Using LabVIEW

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

Download All

Overview

This VI gets a Record set from database and include the column headers.

 
Description

This VI will return a Record set with the option to include the column names in the first row of a multidimensional string array created on the fly from the tables you wish to read.


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Change the Connection String, Table String and Selection String to your requirements.
  2. Run the VI.

Additional Information or References
VI Snippet

008.png

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

A picture paints a thousand words, A video has thousands of pictures.
All help files should be viewed as video.

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

Comments
hsalman
Member
Member
on

Hi,

Is there a way to select the column headers after the query has been executed? For example, I am selecting data from different tables using JOIN, so my result would be different columns from separate tables. I want to be able to see the column headers.

Softman
Member
Member
on

Hi hsalman

'Get Column List' should contain what you need.

A picture paints a thousand words, A video has thousands of pictures.
All help files should be viewed as video.