Skip to main content

Connect to database

Sophie avatar
Written by Sophie
Updated over a week ago

Definition and Usage

Connect to database establishes a connection to a specific database system. This command allows you to connect to different types of database servers including SQLServer, MySQL, and PostgreSQL using either a connection string or a configuration wizard. Once connected, the database connection can be stored in a variable for further use in subsequent database operations.


Parameter Values

Input parameters

Parameter

Description

Possible Values

Required

Options / Notes

Database type

Choose the type of database to connect to

SQLServer, MySQL, PostgreSQL

Yes

Select the appropriate database system you want to connect to

Connect method

Specify the connecting method to a database server

Connection string, Connection configuration wizard

Yes

Choose how you want to establish the connection

Connection string

Enter the connection string to connect to database

-

Yes (if using connection string method)

Contains all necessary information to establish a connection

Server name

Enter the address of the database server to connect to

-

Yes (if using configuration wizard)

Can be an IP address or hostname

Port number

Enter the port number used for the database connection

-

Yes (if using configuration wizard)

Default ports vary by database type

User name

Enter the username required to authenticate and access the database

-

Yes (if using configuration wizard)

-

Password

Enter the password associated with the provided username for authentication

-

Yes (if using configuration wizard)

-

Database name

Select or enter the database name to connect to

-

Yes (if using configuration wizard)

-

Error handling

Parameter Name

Description

Throw error & stop

When an error occurs, the action will trigger an error and stop the execution of the entire app.

Retry command

If an error occurs, the action will retry the command in an attempt to resolve the issue and continue the process.

Ignore error & continue

When an error occurs, the action will be ignored, and the workflow will continue without interruption.

Variables produced

Store database into: Stores the database connection in a new variable that can be used in subsequent database operations.


Using Variables in Conditions

You can use variables for connection parameters by clicking the {x} icon next to input fields. This allows you to dynamically set connection details using previously defined variables. For example, you might use variables to store server names, usernames, or passwords that can change between environments.


Notes

  • Before connecting to a database, ensure you have the correct connection information including server address, port, credentials, and database name.

  • For security reasons, it's recommended to use secure methods to store and retrieve database credentials.

  • The "Test" button allows you to verify the connection before confirming the action.

  • Different database types may require specific connection string formats or additional configuration parameters.

  • Ensure that the database server is accessible from the machine where the RPA process is running.

  • Connection strings typically include sensitive information, so handle them securely.

Did this answer your question?