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

DB Tools Create Parameterized 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

Creates a parameterized SQL query and returns a command reference that you must free eventually. Unless you are detecting the parameters automatically, the number of elements in the parameters array must match the number of parameters you specify in SQL query. For stored procedures, set stored procedure to TRUE and SQL query to the name of the procedure you want to execute.

Examples

auto-detect parameters? if TRUE, this VI attempts to detect the parameters automatically using the SQL query or the stored procedure name.
Note  Automatically detecting parameters can be a time-consuming process and is not supported by all databases and/or database providers/drivers.
connection reference specifies a reference to an ADO Connection object.
SQL query specifies a parameterized SQL query or stored procedure name.
parameters specifies the parameter information.
parameter name specifies the name of parameter.
type specifies the data type of parameter.

0String
1Long (I32)
2Single (SGL)
3Double (DBL)
4Date/Time
5Binary
direction specifies the direction of the parameter value.

0Input (default)
1Output
2Input/Output
3Return Value
value specifies the parameter value.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
stored procedure? specifies that this query is a stored procedure call.
command reference returns a reference to an ADO Command object.
parameters out returns an array of clusters of parameter information.
parameter name returns the name of parameter.
type returns the data type of parameter.

0String
1Long (I32)
2Single (SGL)
3Double (DBL)
4Date/Time
5Binary
direction returns the direction of the parameter value.

0Input
1Output
2Input/Output
3Return Value
value returns the parameter value.
error out contains error information. This output provides standard error out functionality.

Examples

Refer to the following VIs for examples of using the DB Tools Create Parameterized Query VI:

  • Database Insert VI: labview\examples\database
  • Database Logging (parameterized) VI: labview\examples\database
  • Parameterized VI: labview\examples\database

 

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