Example Code

SQL Text Database Example

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 Database Connectivity Toolkit

Code and Documents

Attachment

Description

This is a simple example that allows you to create a table, insert data, and then query the data to make sure that the Microsoft Text Driver is working properly with the LabVIEW SQL Toolkit. The standard procedure for creating a User Data Source Name (DSN) with the Microsoft Text Driver is required. An example text database file is also included in the zip file.

Additional Information on setting up the ODBC administrator for the Microsoft Text Driver:

Under the User DSN in the ODBC administrator, select Add. Choose the Microsoft Text Driver. Give it a DSN, and specify a description if you would like. For the Directory configuration, you can either specify current directory or choose the directory where you want the User DSN to create and read the database files. Each table created will have its own file name.


Related Links:
LabVIEW Database Connectivity Toolkit is now included in LabVIEW Professional

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