Threadsafe Session-Propertie to show running SQL-Statement

Jens Fudickar

Member³
Hi,

exists any thread-safe TOracleSession-Propertie, which shows that an sql-statement is running for the current session.

In an multithreaded environment i want to check if there is any sql-statement running on any other thread for the current session-object.

Otherwise sometimes my application is locked, because in an background-thread the session is used.

Greetings
Jens

------------------
 
This information is not available as a TOracleSession property. Even if a session is currently not busy for a background thread, this can change if a thread subsequently performs an Execute, Next, and so on.

------------------
Marco Kalter
Allround Automations
 
Hi Marco,

thanks for the answer.

Is it possible to implement such a feature in the next release?

Greetings
Jens

------------------
 
I have added this to the enhancement requests, it seems doable. Note however that the restriction mentioned above remains: you never kown when a thread will subsequently access a TOracleSession.

------------------
Marco Kalter
Allround Automations
 
Hi Marco,

yes and no.

If this should work, the enhancement had to be done in tquery, tdataset, ... (i don't have the sources, so i don't know exactly).

I think it should be possible to increment a counter threadsafe, every time the components react to the database.

This will not be perfect, but it's much better, then now, where i don't have any chance to look before.

Greetings
Jens

------------------
 
Back
Top