Re: SQL Server Application roles



Gaspar,

Sorry, I meant do you have a code example? How are you passing the
TADOConnection reference? How/when is the app role executed? Are you sure
the app role is activated before the thread is executed?

MSSQL's Profiler is a good tool to track down if there is another connection
being created (sounds like what might be happening).

Good luck,
krf

"Gaspar" <noreply@xxxxxx> wrote in message
news:43e75f16@xxxxxxxxxxxxxxxxxxxxxxxxx
I've defined subclasses of TThread that are initializated with the main
datamodule's adoconnection. Each X seconds an ADOCommand is executed.
This execution is which causes the exception.

"Kevin Frevert" <kevin@xxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:43e755f2$1@xxxxxxxxxxxxxxxxxxxxxxxxx
Gaspar,

How are you executing your query 'in a separate thread'?

krf

"Gaspar" <noreply@xxxxxx> wrote in message
news:43e74803@xxxxxxxxxxxxxxxxxxxxxxxxx
I started using application roles but I have problems with database
queries that are executed in separated threads.


.