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

DB Tools Get Properties VI

LabVIEW 2013 Database Connectivity Toolkit Help

Edition Date: June 2013

Part Number: 370016F-01

»View Product Info
Download Help (Windows Only)

Owning Palette: Utility VIs

Requires: Database Connectivity Toolkit

Gets properties of the object as determined by the inputs. This VI works for connections, commands, recordsets, columns, and parameters. Wire data to the reference input to determine the polymorphic instance to use or manually select the instance.

Examples

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

Connection

connection reference specifies a reference to an ADO Connection object.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
connection reference out returns a reference to an ADO Connection object.
connection properties returns the following properties that define the database connection.
command timeout (s) returns the length of time, in seconds, the VI waited while attempting to execute a command before quitting and returning an error.
connection string returns the connection string that the VI used to make the database connection.
default database returns the default database the VI used for the connection. Some providers might not support this use of this property.
provider returns the provider this VI used to make the database connection.
error out contains error information. This output provides standard error out functionality.

Recordset (R)

recordset reference specifies a reference to an ADO Recordset object.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
recordset reference out returns a reference to an ADO Recordset object.
recordset properties returns the various properties associated with a recordset object.
column count returns the number of columns in the recordset.
record index returns the zero-indexed position of the current record in the recordset. Some providers or cursor types do not support this property. A value of –2 means that the property is not supported. Values of –3 and –4 indicate that the index is located at Beginning Of File (BOF) and End Of File (EOF), respectively.
record count returns the number of records in the recordset. Some providers or cursor types do not support this property. If this property is not supported, record count returns –1.
bof? if TRUE, the cursor points at the Beginning Of File (BOF). BOF is defined as the position before the first record in the recordset. If both BOF and End Of File (EOF) are TRUE at the same time, records do not exist in the recordset, and navigation of the recordset returns an error.
eof? if TRUE, the cursor points at the End Of File (EOF). EOF is defined as the position after the last record in the recordset. If both Beginning Of File (BOF) and EOF are TRUE at the same time, records do not exist in the recordset, and navigation of the recordset returns an error.
cursor type returns the method used to navigate the recordset. Some providers and/or databases do not support all types of cursors.

dynamicAllows forward and backward navigation. You are able to see all changes other users made to the database.
forward-onlyAllows only forward movement through the recordset. Any changes other users made 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 added, but records deleted by others are not removed from view.
staticAllows forward and backward navigation with no ability to see any changes that other users made during navigation.
cache size returns how many records are kept in local memory.
state returns the state of the recordset. If the recordset is closed, the recordset does not contain any records. A non-row-returning query returns a closed recordset. Many fetching functions return errors if the functions are performed on closed recordsets, so check for errors.

0closed
1open
error out contains error information. This output provides standard error out functionality.

Recordset (CR)

command-recordset reference specifies a reference that combines an ADO Command object and an ADO Recordset object.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
command-recordset reference out returns a reference that combines an ADO Command object and an ADO Recordset object.
recordset properties returns the various properties associated with a recordset object.
column count returns the number of columns in the recordset.
record index returns the zero-indexed position of the current record in the recordset. Some providers or cursor types do not support this property. A value of –2 means that the property is not supported. Values of –3 and –4 indicate that the index is located at Beginning Of File (BOF) and End Of File (EOF), respectively.
record count returns the number of records in the recordset. Some providers or cursor types do not support this property. If this property is not supported, record count returns –1.
bof? if TRUE, the cursor points at the Beginning Of File (BOF). BOF is defined as the position before the first record in the recordset. If both BOF and End Of File (EOF) are TRUE at the same time, records do not exist in the recordset, and navigation of the recordset returns an error.
eof? if TRUE, the cursor points at the End Of File (EOF). EOF is defined as the position after the last record in the recordset. If both Beginning Of File (BOF) and EOF are TRUE at the same time, records do not exist in the recordset, and navigation of the recordset returns an error.
cursor type returns the method used to navigate the recordset. Some providers and/or databases do not support all types of cursors.

dynamicAllows forward and backward navigation. You are able to see all changes other users made to the database.
forward-onlyAllows only forward movement through the recordset. Any changes other users made 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 added, but records deleted by others are not removed from view.
staticAllows forward and backward navigation with no ability to see any changes that other users made during navigation.
cache size returns how many records are kept in local memory.
state returns the state of the recordset. If the recordset is closed, the recordset does not contain any records. A non-row-returning query returns a closed recordset. Many fetching functions return errors if the functions are performed on closed recordsets, so check for errors.

0closed
1open
error out contains error information. This output provides standard error out functionality.

Column (R)

recordset reference specifies a reference to an ADO Recordset object.
column index specifies either the ordinal index of the column or the name of the column.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
recordset reference out returns a reference to an ADO Recordset object.
column properties returns the following properties defined for a column.
name returns the name of the column.
database data type returns the type of data in the column.

0String
1Long (I32)
2Single (SGL)
3Double (DBL)
4Date/Time
5Binary
defined size returns the defined size of the column.
actual size returns the actual size of the column.
error out contains error information. This output provides standard error out functionality.

Column (CR)

command-recordset reference specifies a reference that combines an ADO Command object and an ADO Recordset object.
column index specifies either the ordinal index of the column or the name of the column.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
command-recordset reference out returns a reference that combines an ADO Command object and an ADO Recordset object.
column properties returns the following properties defined for a column.
name returns the name of the column.
database data type returns the type of data in the column.

0String
1Long (I32)
2Single (SGL)
3Double (DBL)
4Date/Time
5Binary
defined size returns the defined size of the column.
actual size returns the actual size of the column.
error out contains error information. This output provides standard error out functionality.

Command (C)

command reference specifies a reference to an ADO Command object.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
command reference out returns a reference to an ADO Command object.
command properties returns the following properties that define the most recent SQL query.
parameter count returns the number of parameters.
command text returns the parameterized SQL command.
command timeout (s) returns the length of time, in seconds, the VI waited while attempting to execute a command before quitting and returning an error.
error out contains error information. This output provides standard error out functionality.

Command (CR)

command-recordset reference specifies a reference that combines an ADO Command object and an ADO Recordset object.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
command-recordset reference out returns a reference that combines an ADO Command object and an ADO Recordset object.
command properties returns the following properties that define the most recent SQL query.
parameter count returns the number of parameters.
command text returns the parameterized SQL command.
command timeout (s) returns the length of time, in seconds, the VI waited while attempting to execute a command before quitting and returning an error.
error out contains error information. This output provides standard error out functionality.

Parameter (C)

command reference specifies a reference to an ADO Command object.
parameter index specifies either the ordinal index of the parameter or the name of the parameter.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
command reference out returns a reference to an ADO Command object.
parameter properties returns the following properties that define the query parameters.
name returns the name of the parameter.
SQL data type returns all the data types used in databases. Because each specific database application supports different data types, the options in this control have been condensed and named for the data types as they are represented in the LabVIEW Database Connectivity Toolkit.
direction returns the direction of the parameter value.

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

Parameter (CR)

command-recordset reference specifies a reference that combines an ADO Command object and an ADO Recordset object.
parameter index specifies either the ordinal index of the parameter or the name of the parameter.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
command-recordset reference out returns a reference that combines an ADO Command object and an ADO Recordset object.
parameter properties returns the following properties that define the query parameters.
name returns the name of the parameter.
SQL data type returns all the data types used in databases. Because each specific database application supports different data types, the options in this control have been condensed and named for the data types as they are represented in the LabVIEW Database Connectivity Toolkit.
direction returns the direction of the parameter value.

0Input
1Output
2Input/Output
3Return 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 Get Properties VI:

  • Database Fetching VI: labview\examples\database
  • Playback (fetching) 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