Fetching table values from oracle database to Uipath

Hi Everyone :slight_smile:
I am trying to connect UiPath with oracle database and fetch table data from oracle to excel, and pass those values to a web form.However i have done the connection successfully and i am able to run a workflow by writing desired SQL queries to fetch data.But the problem happening here is only header information are populating in excel file not the values.Please help me to fetch all data from oracle and how to pass it to web form. Thanks in advance #learn #Build

@Swetadurba

you can use execute query activity and write a query as

Select * from TABLENAME

This will return you a data table, so using for each row activity you can place your logic inside

Hope this may helps you

Thanks

Hi,
Please use the ‘execute query’ activity which returns datatable as output. Verify the result query from the UiPath and run it in Oracle and search the result
sample SQl Query :- SELECT * FROM table_name WHERE [your condition]
(OR) SELECT requiredColum1, requiredColumn2,… FROM table_name

Provide your sample workflow file or screenshots of your logic for better understanding to resolve your issue

1 Like

Hello,
I have already used execute query and header data are getting updated in excel sheet not the values… here i am attaching my workflow.Do please check it
Main.zip (1.6 KB)

Hi @ksrinu070184
I have already used the execute query where i am trying to fetch an employee details based on name and saving it in a excel file. I am able to get the columns in excel but data inside those columns are not getting updated. Could you please share any example xaml file, it will be very helpful for me as i am trying this concept for first time .Thanks :slight_smile:

@Swetadurba

Check as below

In that video, I used how to write to Datatable to excel

Also check again that your datatable contains the data by using output data table and place a messagebox

Hope this may helps you

Thanks

1 Like

Hi, Thanks for sharing this, but my problem statement is to fetch data from oracle database and write into csv. The query is being executed but in csv file only header information is updating without the values.Here i am attaching the workflow, Please let me know where i am going wrong. Thanks
Main.zip (1.6 KB)

@Swetadurba

Check below

You need to sure that datatable is returning the values

Please share the screenshot of the Datatable output, by placing like above

Hope this helps

Thanks

1 Like

hi @ksrinu070184 ,
I tried with above logic, and placed the datatable in output datatable. Still i am not getting the values. And in message box also blank value is populating.
In excel i am getting only column names. Please check below screenshots. Thanks


image

Hi,

I have verified your workflow and connected to my ‘MySql’ Database (As I dont have Oracle)
It is working fine and creating csv file with data. I checked the output data table count also

My suggestion is to check the ‘connection string’ and ‘providerName’ values in the properties of ‘Connect’ activity
If everything is fine check the the data base is connected or not
If connected then check the datatable row count which is the output of ‘Execute Query’ activity

Main_DataBaseQry.zip (2.3 KB)

2 Likes

@Swetadurba

Create a variable to the output Datatable properties -> Text field

Disconnect write csv and place message box next to output Datatable

and pass the value

image

Hope this helps

Thanks

Hi,
Yes it is returning column names now.
But the values of the columns it is not returning.
Thanks
image

@Swetadurba

Yes, so you need to check the query is correct

OR

You just place

Select * from emp

Then check if you are getting values

Hope this helps

Thanks

1 Like

Hi @Venugopal24
yes, oracle is successfully connected and it is fetching the columns. The only problem was with sql query. I did not place “;” after the query so it was fetching only the columns. Thanks a lot for your help. :slight_smile:
If you have any workflow how to pass these data to another web form kindly share it as i am new to this platform and learning to expand my knowledge.

@ksrinu070184
Hi, yes now i am able to fetch it. The problem was with the query . I did not place the semicolon. Thanks a lot for your kind help. :slight_smile:

1 Like

@ksrinu070184
Hi, the process is now working fine. Now i am trying to schedule this in task scheduler by writing batch file. But when it is running it is asking as how do u want to open the .xaml file even if the uipath studio application already present. Please help me to overcome this problem .
Thanks in advance :blush:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.