LabVIEW Database Connectivity Toolkit API Reference

Table of Contents

Database VIs and Function

  • Updated2023-02-21
  • 2 minute(s) read
June 2013, 370016F-01

Requires: Database Connectivity Toolkit. This topic might not match its corresponding palette in LabVIEW depending on your operating system, licensed product(s), and target.

Use the Database VIs and function to access databases from LabVIEW.

With the Database VIs and function, you can perform the most common database tasks, including the following:

  • Work with any provider that adheres to the Microsoft ActiveX Data Object (ADO) standard.
  • Work with any database driver that complies with ODBC or OLE DB.
  • Maintain a high level of portability. In many cases, you can port your application to another database by changing the connection string you pass to the DB Tools Open Connection VI.
  • Convert database column values from native data types to standard LabVIEW Database Connectivity Toolkit data types.
  • Use SQL statements with all supported database systems, including non-SQL systems, using the default ADO ODBC provider.
  • Retrieve the name and data type of a column returned by a SELECT statement.
  • Create tables and select, insert, update, and delete records without using SQL statements.

The VIs and function on this palette can return general LabVIEW error codes.

Palette ObjectDescription
Database Variant To DataConverts a database variant to the LabVIEW data type specified in type so you can use the data in another function or VI.
DB Tools Close ConnectionCloses a database connection by destroying its associated connection reference.
DB Tools Create TableCreates a new table in the database identified by connection reference. The table and column information inputs describe the name of the table and the properties of each column in the table, respectively.
DB Tools Delete DataDeletes data from a database identified by connection reference.
DB Tools Drop TableDeletes the specified table from the database identified by connection reference.
DB Tools Insert DataInserts a new row into the table in the database identified by the connection reference.
DB Tools Open ConnectionOpens a database connection using the connection information path and returns a connection reference. If prompt? is set to TRUE, LabVIEW displays a dialog box to set up the connection. Wire data to the connection information input to determine the polymorphic instance to use or manually select the instance.
DB Tools Select DataSelects data from the table in the database identified by connection reference using the columns supplied in the columns array.
DB Tools Update DataUpdates the data in a database identified by connection reference.


SubpaletteDescription
Advanced VIsUse the Advanced VIs to perform advanced database operations such as executing SQL statements and fetching data. You might need to use SQL when you use these VIs.
Utility VIsUse the Utility VIs for a variety of operations, including getting table and column information, getting and setting database properties, formatting data and time data, performing database transactions, and writing and reading data files.

© 1999–2013 National Instruments. All rights reserved.

Log in to get a better experience