How to insert a DataTable extracted from DataScraping from a Webpage into SQL Database?

I’ve Extracted a Data Table from a web page but I’m not able to figure out how to insert that Data table into my database in SQL Server. Any advice how.

Buddy @Anubhav_Ghildiyal

Download this package buddy, where you will be having activity called
insert , in which click the connection wizard, select Microsoft SQL Server and mention the server name, username and password and database name and click Test Connection that would help you to check the connection with you sql server as well

once doing this mention your table name in the database as string in the table name input of INSERT activity and mention the extracteddatatable in DATATABLE input
while mentioning the table name of database mention like this for example
“[yourtablename]”

Hope this would help you buddy @Anubhav_Ghildiyal
Chees @Anubhav_Ghildiyal

Use SQL Activities, start a Transaction and make an insert into your table (Make sure your DataTable matches with your SQL Table)

So @asesor-rpa what you are saying is that the database table in sql server and the data table in uipath should have the same name ? and one more question what changes do i have to make in the sql insert query. Just a simple example would do.

Ok Thanks @Palaniyappan let me try, and if I have any issue I would require further assistance from you.

1 Like

Sure buddy @Anubhav_Ghildiyal
Kindly let know whether that worked or not
Cheers

Not the same name, but compatible datatype in columns
Would be a possible way to resolve it:

  1. For each Row, Do:
    Use SQL Query (“INSERT INTO mytable (column1, column2) VALUES (”+(row(‘column1’).toString() + “,”+ convert.ToInt32(row(‘column2’))

were you able to connect to sql sever buddy @Anubhav_Ghildiyal

Yes, I was able to get the data table into data base Thanks @Palaniyappan.

1 Like

Thanks @asesor-rpa this is the exact query that I was looking for thanks a lot.

Thats great buddy @Anubhav_Ghildiyal
Cheers

2 Likes