Re: app roles and ADO connections

From: Mary Chipman (mchip@nomail.please)
Date: 11/08/02


From: Mary Chipman <mchip@nomail.please>
Date: Fri, 08 Nov 2002 09:33:35 -0500


Check the syntax of your connection string -- turning off connection
pooling should work if you are reusing the same connection, which you
can verify with a Profiler trace. You can also verify if the
application role is active by checking the database user name -- if
it's active, then the database user is the application role. If it's
not active, then you can execute sp_setapprole on the connection to
activate it. You only have problems with this if the connection is
being reused from the pool, in which case you get an error.

-- Mary
MCW Technologies
http://www.mcwtech.com

On Fri, 8 Nov 2002 04:13:24 -0800, "Diederik"
<diederikvanpeer@hotmail.com> wrote:

>Hello all,
>I'm having problems with the combination of SQL Server
>application roles and ADO connections. Although I use a
>single ADO connection in my VB application (on which the
>sp_setapprole stored procedure is executed), I'm
>getting 'EXECUTE permission denied on object...' messages.
>
>On www.sqlteam.com I read the following comment by a user
>named Jeffrey:
>
><quote>
>You should note that the use of AppRoles with ADO is
>problematic since the approles is strictly a SQL Server
>concoction that ADO is apparently not aware of or
>programmed to.
>
>In some cases ADO will create additional connections
>behind the scenes (especially when connections
>are 'busied') and since it doesnt know about approles they
>are not propogated automatically to the cloned
>connections. As a result, the new conenctions cannot
>access the database through the approle and would rely on
>whatever other access permisions the user had.
><end quote>
>
>Is there a workaround to prevent ADO from creating these
>additional connections? I tried the "OLE DB Services = -2"
>option, without success.
>
>Thanks for any help,
>Diederik



Relevant Pages

  • Re: C++ support for ADO
    ... TESTHR(pConn.CreateInstance(__uuidof(Connection))); ... In answer to your question I'm interested in ADO not the ADO.net. ... data classes for working with ADO/OLE DB. ... You can also use the OLE SDK. ...
    (microsoft.public.data.ado)
  • Re: ODBC/OLE DB Connection Pool
    ... > connection be kept open for the application as this will serialize all ... threads ONCE they are returned to the pool. ... > Tips for ADO Users ... > The ADO Connection object implicitly uses IDataInitialize. ...
    (microsoft.public.data.ado)
  • Re: ODBC/OLE DB Connection Pool
    ... > connection be kept open for the application as this will serialize all ... threads ONCE they are returned to the pool. ... > Tips for ADO Users ... > The ADO Connection object implicitly uses IDataInitialize. ...
    (microsoft.public.inetserver.asp.db)
  • Re: ODBC/OLE DB Connection Pool
    ... > connection be kept open for the application as this will serialize all ... threads ONCE they are returned to the pool. ... > Tips for ADO Users ... > The ADO Connection object implicitly uses IDataInitialize. ...
    (microsoft.public.data.oledb)
  • Re: How to make the app run?????
    ... throwing an error if the connection never was opened, ... How can i tell if i'm using ADO as in VB or .Net ADO ?? ... First of all, it was not shown to my customer, I took it to a very nice ... How do you get in "installed" on client computer? ...
    (microsoft.public.dotnet.general)