Inserting data to database requires couple of steps. Kindly follow the below steps and let us know where exactly you are facing challenge
- Assign the values to the required variables using the Assign activity.
- Use the Connect activity from the UiPath.Database.Activities package to establish a connection to your database.
- Create an SQL insert query string that includes the variable values.
- 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 + "')"
- 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