SQL Server Application roles



I started using application roles but I have problems with database queries
that are executed in separated threads.

This is the scenario:
1) I connect to SQL Server 2005 with a user that only has CONNECT
permissions (i.e no permissions for select, update, etc.)
2) I execute sp_setapprole with an application role that has full access to
databases (just for testing).
3) Everything goes ok, I conect to table, open queries, etc., BUT if I
execute queries in a separated thread I get a "You haven't SELECT permission
on table XXX".

I read http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q229564 about
OLEDB resouces pooling. I tried including the "OLE DB Services= -2" string
in ADOConnection.ConnectionString but It didn't seem to help.

Other ideas?


.



Relevant Pages

  • Re: SQL Server Application roles
    ... queries that are executed in separated threads. ... permissions ... I execute sp_setapprole with an application role that has full access ... Everything goes ok, I conect to table, open queries, etc., BUT if I ...
    (borland.public.delphi.database.ado)
  • Re: CREATE VIEW error
    ... Is Field3 really your field name? ... The EXECUTE accepts an execute query which will be used with a ... The idea is that i need to write me complex queries, ... I'm just taking existing querydef's from the access database ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: CREATE VIEW error
    ... exists, yes the query works in access development, asking more is time ... Is Field3 really your field name? ... The EXECUTE accepts an execute query which will be used with a ... The idea is that i need to write me complex queries, ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: CREATE VIEW error
    ... exists, yes the query works in access development, asking more is time ... Is Field3 really your field name? ... The EXECUTE accepts an execute query which will be used with a ... The idea is that i need to write me complex queries, ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: CREATE VIEW error
    ... Is Field3 really your field name? ... The EXECUTE accepts an execute query which will be used with a ... The idea is that i need to write me complex queries, ... I'm just taking existing querydef's from the access database ...
    (microsoft.public.dotnet.framework.adonet)