Table Of Contents

Create Parameterized Query (G Dataflow)

Version:
Last Modified: February 27, 2020

Creates a structured SQL query statement that accepts a value or array of values.

spd-note-note
Note  

Make sure that the number of parameters in your array input matches the number of parameters specified in the SQL query input. Enable auto-detect parameters? to make the node automatically determine the number of parameters.

spd-note-note
Note  

For stored procedures, set the stored procedure input to TRUE and SQL query input to the name of the procedure you want to execute.

connector_pane_image
datatype_icon

connection reference

Reference to an ADO Connection object. Connection objects represent a connection with a data source, including methods to open and close a connection with a database, which database to connect with, and the level of isolation for database transactions.

datatype_icon

SQL query

Parameterized SQL statement or stored procedure name used to access a database. Use parameterized statements to simplify queries by requiring only the entry of particular chosen values by the user. They minimize re-use of SQL code and can be effective against security vulnerabilities such as injection attacks.

datatype_icon

parameters

Specifies the parameter properties such as name and data type.

datatype_icon

error in

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Default: No error

datatype_icon

auto-detect parameters?

A Boolean value that determines whether to use an SQL query or a stored procedure name for automatic parameter detection.

datatype_icon

stored procedure?

A Boolean value that indicates whether the query is a stored procedure call.

datatype_icon

command reference out

Reference to an ADO Command object. Use a Command object to query a database, return records, execute bulk operations, and manipulate data within a database.

datatype_icon

parameters out

Array of clusters of parameter properties.

datatype_icon

error out

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported

Web Server: Not supported in VIs that run in a web application


Recently Viewed Topics