To download NI software, including the products shown below, visit ni.com/downloads.
1. Overview
The National Instruments DBToolkit provides VI’s for opening database connections, executing queries and parameterized queries, listing table properties, and navigating the resultant recordset(s) returned from a query. This simple VI wraps a number of calls to functions in the DBToolkit to provide a fully-functional and handy wrapper to execute queries against a database and return results.
2. Description
The code makes a database connection, executes a standard or prameterized query, enumerates the resultant recordsets and column names, and returns an array of column name / recordset data. The VI also provides convenience outputs for the first recordset found in the query – most of the time a single recordset is returned.
3. Requirements
4. Steps to Implement or Execute Code
5. Additional Information or References
**The code for this example has been edited to meet the new Community Example Style Guidelines.**
Description-Separate-2Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.