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.
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
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.
Sure buddy @Anubhav_Ghildiyal
Kindly let know whether that worked or not
Not the same name, but compatible datatype in columns
Would be a possible way to resolve it:
- 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.
Thanks @asesor-rpa this is the exact query that I was looking for thanks a lot.
Thats great buddy @Anubhav_Ghildiyal