Create Connection
ActionStep Reference » Windows » Database » Create Connection
The ActionStep Create Connection establishes a link with an existing database. Setting the correct value for the Service and Provider parameters is essential to successfully connect with the database.
- Open the Windows node in the Workspace Explorer.
- Open the Database node, select the Create Connection ActionStep.
Parameters:
The ActionStep has the following input parameters:
name |
Description
|
---|---|
Service
|
The service or platform of the database.
Accepted values: MS Access, MSSQL, MySQL Allowed Context Scopes [Fixed, Local, Global] |
Server
|
The URL of the database to be used.
Allowed Context Scope [Fixed, Local, Global] Allowed Context Type [Variable, Parameter, Enum] |
Provider
|
The interface that accesses the data of a database.
Accepted values: ADsDSOObject, Microsoft.ACE.OLEDB.12.0, Microsoft.ACE.OLEDB.16.0, MSDAOSP, MSDASQL, MSDAQL Enumerator, MSDataShape, SQLOLEDB, SQLOLEDB Enumerator Allowed Context Scope [Fixed] |
Database
|
The name of the database.
Allowed Context Scope [Fixed, Local, Global] Allowed Context Type [Variable, Parameter, Enum] |
User Name
|
The login user name for the database.
Allowed Context Scope [Fixed, Local, Global] Allowed Context Type [Variable, Parameter, Enum] |
Password
|
The login password for the database.
Allowed Context Scope [Fixed, Local, Global] Allowed Context Type [Variable, Parameter, Enum] |
The parameters "Provider" and "Database" are reset when changing the database type.
|
Results:
The ActionStep returns the following results:
name
|
description
|
---|---|
Connection
|
The output of the database connection, tables, and fields.
Allowed Context Scopes [Fixed, Local, Global] |
Table Count
|
The number of tables in the database.
Allowed Context Scopes [Fixed, Local, Global] |
Tables
|
The list of tables in the database.
Allowed Context Scope [Fixed] |
Runs a version check of the installed "Microsoft Access". |
Example 1 (Connect to an MS Access database):
This example creates a local variable named DBConnect with Text as its data type. The variable was then set as the value of the Database parameter for the MS Access file and used Microsoft's OLE (Object Linking and Embedding) DB as its provider. If the connection to the database was successful, the Message Box in the "Then" branch is displayed, otherwise, the ActionStep in the "Else" branch is executed.
See other Database operations:
Create Table
Select Table
Insert Table
Update Table
Delete Table