Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

DB Tools Execute Query VI

LabVIEW 2013 Database Connectivity Toolkit Help

Edition Date: June 2013

Part Number: 370016F-01

»View Product Info
Download Help (Windows Only)

Owning Palette: Advanced VIs

Requires: Database Connectivity Toolkit

Executes an SQL query and returns a recordset reference that you must eventually free with the DB Tools Free Object VI. Wire data to the reference input to determine the polymorphic instance to use or manually select the instance.

Example

Use the pull-down menu to select an instance of this VI.

Connection

cache size specifies the number of records to store in local memory. After you retrieve the number of records in local memory and you request the next record, the current set of records is discarded from local memory and the next set are retrieved into local memory. The default is 1. Adjusting this setting might improve performance when fetching records. However, if the cursor type input is set to forward-only, you must use the default cache size of 1. If you select a different cursor type, you can set cache size to any value greater than 0.
connection reference specifies a reference to an ADO Connection object.
SQL query specifies the SQL statement to execute.
cursor type specifies the method for navigating the recordset. Some providers and/or databases do not support all cursors.

dynamicAllows forward and backward navigation. You are able to see all changes other users make to the database.
forward-onlyPermits only forward movement through the recordset. Any changes other users make to the database during navigation are not visible. This method provides the highest performance.
keysetAllows forward and backward navigation. You are able to see records that other users add, but records deleted by other users are not removed from view.
staticAllows forward and backward navigation with no ability to see any changes that other users make during navigation.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
recordset reference returns a reference to an ADO Recordset object.
error out contains error information. This output provides standard error out functionality.

Command

cache size specifies the number of records to store in local memory. After you retrieve the number of records in local memory and you request the next record, the current set of records is discarded from local memory and the next set are retrieved into local memory. The default is 1. Adjusting this setting might improve performance when fetching records. However, if the cursor type input is set to forward-only, you must use the default cache size of 1. If you select a different cursor type, you can set cache size to any value greater than 0.
command reference specifies a reference to an ADO Command object.
cursor type specifies the method for navigating the recordset. Some providers and/or databases do not support all cursors.

dynamicAllows forward and backward navigation. You are able to see all changes other users make to the database.
forward-onlyPermits only forward movement through the recordset. Any changes other users make to the database during navigation are not visible. This method provides the highest performance.
keysetAllows forward and backward navigation. You are able to see records that other users add, but records deleted by other users are not removed from view.
staticAllows forward and backward navigation with no ability to see any changes that other users make during navigation.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
command-recordset reference returns a reference that combines an ADO Command object and an ADO Recordset object.
error out contains error information. This output provides standard error out functionality.

Example

Refer to the Database Fetching VI in the labview\examples\database directory for an example of using the DB Tools Execute Query VI.


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit