I am currently working on a Project which needs to be login to an app and extract the required data and write the extracted data into the output database.
Currently I extracted the required data from the app and storing each extracted data in a variable.
I am storing around 10 to 12 data in to the variables.
But I am not getting how to write this extracted data in to the mssql databse, please someone guide me how to achieve this??
You can try to do this by connecting to the database by building appropriate connection string & then run a query to insert the data into the database.
I have already created the connection between DB and UiPath also I have created the table with only headers(in the same table I need to write the extracted data.
Ok, whether I need to use the add datarow activity inside the for each row or I need to use without for each row activity??
Because I am using the Re framework
If you are passing one row at a time to the database, then no need to use a for each. Just use the add data row and then pass it to data table thereafter database. This will be handled in the Re Framework @Vrishchik
To write the extracted data into an MSSQL database in UiPath, you can follow these steps:
First, you need to establish a database connection. You can use the “Connect” activity from UiPath.Database.Activities package to establish a database connection. You will need to provide the necessary database credentials and connection string information.
Once the connection is established, you can use the “Execute Query” activity to write the extracted data into the database. You will need to write an SQL query that inserts the data into the appropriate table in the database.
In the “Execute Query” activity, you can pass the SQL query as a parameter and provide the input data as variables. You can use the variables that you have already extracted and stored to pass the input data.
Finally, you can use the “Disconnect” activity to close the database connection.