hiii guys,i’m just working on sql database got struck in the middle of the process, my query is i have my database where it has table with 3 columns say name,id,output and out of which i have values in name and id column and the output column is empty,empty in the sense not null value and now the thing is i,m able to get the data from database as output as datatable and the thing i have to open browser and fill the details of name and id and it will give you a text as output.now by using get text activity i can able to store it in a variable.now i want that output variable value to be insert in output column in my database for each row how can i do that.
- The returned out put variable of the query is data table.
- you are using the for each row to loop in.
- use update query inside the for each loop
SET column4 = @value
WHERE condition ;
Use insert activity
Hi buddy @venkatmalla6
- You might be getting an output of type datatable from the execute query activity say out_dt, with those three COLUMNS
- While iterating through each row in a for each row loop and using a type in to Activity and getting the value by get text…
- Assign that get text value to that column being inside the for each row loop itself
row(“output”) = gettextoutoutvariable
- Then use execute query, use delete statement to delete all the records in that table in database
- Then use a insert query where mention the table name in database and mention the datatable out_dt as input, as this datatable has the column output updated with values
Hope this would help you buddy
@Palaniyappan thanks buddy,i understand somewhat but if possible can you share me a samlpe xaml file. thank you
@Palaniyappan buddy, i got an error actually i have a excel sheet with columns as name,id,output what i’m doing is i’m trying to insert each row into my sql database which is having same columns as above while i was running it is showing some error plz have a look
Fine use insert activity buddy not execute non query
where you dont need to write any insert statement rather we can mention the input as the tablename in database and pass the input with datatable you have
still any issues buddy @venkatmalla6
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.