Threaded TOracleQuery over a database link does not finish

nwgarside

Member²
Using Delphi 6 Pro (SP2), Oracle 8.1.7, DOA v3.4.6.1.

My TOracleQuery's SQL is as follows:

BEGIN
SELECT col1 INTO
tongue.gif
Col1 FROM my_table WHERE...;
SELECT col2 INTO
tongue.gif
Col2 FROM my_table@NCAP WHERE...;
END;

The query works fine and takes 4-5 seconds retrieving the two values (NCAP is a database located on the other side of a relatively slow network link).

I'd like to thread the query so I've set TOracleQuery.Threaded to True and have written an OnThreadFinished procedure to retrieve the query's variables. However the query never appears to finish. If I remove the '@NCAP' from the SQL then it behaves as expected.

Are there restrictions preventing a threaded query from running over a database link?

Regards,

Neil W. Garside
 
I'm not aware of any restrictions. The PL/SQL block is executed, and OnThreadFinished is called when it's done.

Could it be that you perform some other activities on the same session in the main thread of your application? Note that these activities must wait until the threaded query is done.

------------------
Marco Kalter
Allround Automations
 
Back
Top