Database VIs and Function
- Updated2023-02-21
- 2 minute(s) read
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 Object | Description |
---|---|
Database Variant To Data | Converts 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 Connection | Closes a database connection by destroying its associated connection reference. |
DB Tools Create Table | Creates 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 Data | Deletes data from a database identified by connection reference. |
DB Tools Drop Table | Deletes the specified table from the database identified by connection reference. |
DB Tools Insert Data | Inserts a new row into the table in the database identified by the connection reference. |
DB Tools Open Connection | Opens 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 Data | Selects data from the table in the database identified by connection reference using the columns supplied in the columns array. |
DB Tools Update Data | Updates the data in a database identified by connection reference. |
Subpalette | Description |
---|---|
Advanced VIs | Use 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 VIs | Use 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.