Adding Data to Database in ui path

database
insert

#1

Hi all,

I am new to RPA.

I am Having trouble in inserting data to database. I have 3 pdfs I read their data using substrings.
Each pdf it has data about id, brand, size ,color,
So each pdf I created variables as, id1,id2,id3, brand1,brand2,brand3 size1,size2,size3 color1,color2,color3

I want to put all these data into one table(save_pdf_data) which columns names are, id , brand, size and color,

Can anyone help me on this?

Thanks in advance :slight_smile:


#2

Hi @savithrin

I think you can use below UiPath activities.

  1. Build data table: save_pdf_data with column id, brand, size, color
  2. Add data row>>Input>>array row = {id1,brand1,size1,color1}

Rgds,
J,


#3

@savithrin

Do you mean to an SQL DB?

  1. Install UiPath.Database.Activities package
  2. Use Database Connect Activity
  3. Use Database Execute Query Activity
    “INSERT INTO myDBTable (id1,brand1,size1,color1) VALUES (‘123’,‘mybrand’,‘mysize’,‘blue’)”
  4. Use Database Disconnect Activity

#4

yes it is a SQL BD. In my case I have to insert data as variables.


#5

strFieldNames = col1 + ", " + col2 + ", " + col3 + ", " + col4
strValues = val1 + ", " + val2 + ", " + val3 + ", " + val4

“INSERT INTO " + strTableName + " (” + strFieldNames +") VALUES (" + strValues +")"


#6

Hi All,

I have a requirement like below. Iam able to fetch few values from a web page into some Variables in uipath. Now the requirement is to load the same variables into a Database through UIPATH.

Can someone guide me how to do.I got my server setup done through connect stage.

Iam able to perform the insert through execute non query.But passing the variables as input is challenging for me.

Please suggest me.