DB Tools Open Connection VI
- Updated2023-02-21
- 4 minute(s) read
DB Tools Open Connection VI
Owning Palette: Database VIs and Function
Requires: Database Connectivity Toolkit
Opens a database connection using the connection information path and returns a connection reference. If prompt? is set to TRUE, LabVIEW displays a dialog box to set up the connection. Wire data to the connection information input to determine the polymorphic instance to use or manually select the instance.
DB Tools Open Connec (Path)
![]() |
userID specifies the user ID needed to access the database. You might not need to specify a userID. |
![]() |
connection information is the absolute path of the file that stores the connection information. For a Microsoft Data Link file, this path must have a .udl extension. A File DSN must have a .dsn extension. |
![]() |
prompt? If TRUE, LabVIEW prompts you to determine connection parameters. Using this input is an alternative to using a connection string. If prompt? is TRUE, LabVIEW ignores the connection string and uses the prompt instead. |
![]() |
connection timeout determines the length of time (in seconds) to wait while attempting to make a connection to a database before quitting and returning an error. The default is 15. Setting this value to 0 instructs the VI to wait indefinitely. |
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. |
![]() |
password specifies the password required to access the database for security purposes. You might not need to specify a password. |
![]() |
connection reference returns a reference to an ADO Connection object. |
![]() |
error out contains error information. This output provides standard error out functionality. |
DB Tools Open Connec (String)
![]() |
userID specifies the user ID needed to access the database. You might not need to specify a userID. |
![]() |
connection information specifies the connection string to use to connect to the database. For User and System ODBC Data Sources, provide the name of the data source as configured in the Windows ODBC Administrator. You also can specify a path to a UDL or DSN file by prefixing the path with file name= or filedsn=, respectively. |
![]() |
prompt? If TRUE, LabVIEW prompts you to determine connection parameters. Using this input is an alternative to using a connection string. If prompt? is TRUE, LabVIEW ignores the connection string and uses the prompt instead. |
![]() |
connection timeout determines the length of time (in seconds) to wait while attempting to make a connection to a database before quitting and returning an error. The default is 15. Setting this value to 0 instructs the VI to wait indefinitely. |
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. |
![]() |
password specifies the password required to access the database for security purposes. You might not need to specify a password. |
![]() |
connection reference returns a reference to an ADO Connection object. |
![]() |
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 Open Connection VI:
- Connect to ACCDB Database VI: labview\examples\database
- Database Connection VI: labview\examples\database
- Telecommunications Parametric Testing VI: labview\examples\database