Database Variant To Data
- Updated2024-07-30
- 3 minute(s) read
Converts a database variant to the LabVIEW data type specified in type so you can use the data in another function or subVI.

Inputs/Outputs
type
—
specifies the data type into which you want to convert variant data.
database variant
—
specifies the variant data you want to convert to the data type specified in type. You can wire a variant, a 1D array of variants, or a 2D array of variants to this input. Refer to the Details section of this topic for more information about using this input.
error in (no error)
—
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
data
—
returns the resulting data type.
error out
—
error out contains error information. This output provides standard error out functionality. |
Database Variant To Data Details
You can wire a variant, a 1D array of variants, or a 2D array of variants to the database variant input. Depending on the data type that you wire to the type and database variant inputs, this function performs the following different conversions:
| Data Type of "database variant" | Data Type of "type" | ||||
|---|---|---|---|---|---|
| Cluster | 1D Array of Non-Clusters | 1D Array of Clusters | 2D Array | Others | |
| Variant | This function converts the variant to the LabVIEW data type specified in type. | ||||
| 1D Array of Variants | Each element in the cluster defines a column. This function converts each element of the 1D array to a column in sequence. The output is a cluster. | This function converts each element of the 1D array to the element data type specified in type. The output is a 1D array. | This function converts each element of the 1D array to a cluster. The output is a 1D array of clusters. | The wire of database variant is broken. | The wire of database variant is broken. |
| 2D Array of Variants | The wire of database variant is broken. | The wire of database variant is broken. | This function converts each row of the 2D array to a cluster. The output is a 1D array of clusters. | This function converts each element of the 2D array to the element data type specified in type. The output is a 2D array. | The wire of database variant is broken. |
| Others | The wire of database variant is broken. |
Examples
Refer to the following VIs for examples of using the Database Variant To Data function:
- Convert Database Variant to Data VI: labview\examples\database
- Sixtypes Select VI: labview\examples\database
- Playback VI: labview\examples\database
type
—
error in (no error)
—
data
—
error out
—