Database Run Query Activity

Inserting data to database requires couple of steps. Kindly follow the below steps and let us know where exactly you are facing challenge

  1. Assign the values to the required variables using the Assign activity.
  2. Use the Connect activity from the UiPath.Database.Activities package to establish a connection to your database.
  3. Create an SQL insert query string that includes the variable values.
  4. Use the Run Query activity to execute the SQL insert query.

For example, if you have variables for name and phone number, your SQL query might look like this:

"INSERT INTO YourTableName (NameColumn, PhoneColumn) VALUES ('" + nameVariable + "', '" + phoneVariable + "')"
  1. Finally, use the Disconnect activity to close the database connection.

This process allows you to insert variable values into a database table using the Run Query activity in UiPath

1 Like