Click here to Skip to main content
15,911,896 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have this code inside a background worker. ODA- Oracle Data Adapter
ds- Dataset, OleCon is ole connection.



at select command it takes 2 minutes to complete the querry.
cancelsynq is not working at this place.
how I report this into progress bar.? and how I cancelsync.? Please help

What I have tried:

If OleCon.State = ConnectionState.Open Then OleCon.Close()
OleCon.Open()
Dim cmd As New OleDbCommand(qry, OleCon)
ODA.SelectCommand = cmd 'Here takes too long time
ODA.Fill(ds, table)
OleCon.Close()</pre>
End If
Posted
Updated 20-Nov-16 23:56pm
v3

1 solution

Quote:
How to find the execution progress.?
Basically, you can't.
Displaying a progress bar imply that you know the amount of work of the query, but you usually know it only once the job is finished.
Quote:
at select command it takes 2 minutes to complete the querry.
If it takes 2 minutes to complete, it imply that the query need a huge work to complete, chances are that the query can't be optimized by Oracle.
Best hope would be to show that query to see if one can change it to be faster.

[Update]
Be careful both DateTimes are not using the same format.
An index on TEST_DTTM would certainly speed up the query.
 
Share this answer
 
v2
Comments
vivianpinto 21-Nov-16 0:45am    
Hi Morphe

Thanks for the response.

my query is simple, The location column do not have indexing.

Select * from dqc342 Where Location= 'A9T80-60008 ' and TEST_DTTM between to_date('20161121000000','yyyymmdd hh24miss') and to_date('20161121 235959','yyyymmdd hh24miss')



I have a question. How I stop this query when user want to abort.
Patrice T 21-Nov-16 1:48am    
Use Improve question to update your question.
So that everyone can pay attention to this information.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900