Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 application roles with SQL Svr 7/ Access 2000 Project

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-08-14 : 13:32:05
Thomas writes "Hi,
I am using SQL Server 7.0 with NT 4.0 /SP6a. The Client runs an Access 2000 project (Office 2000 SP1). The client application should use an application role. So I establish the regular connection (user login, SQL Server Security) with

CurrentProject.OpenConnection strConnectionString

This works. So, next I try to enable the application role, using:

Dim cmdAppRole As New ADODB.Command
cmdAppRole.ActiveConnection = CurrentProject.Connection
cmdAppRole.CommandText = "EXEC sp_setapprole 'appl_role_name', {Encrypt N 'password'}, 'odbc'"
cmdAppRole.Execute , , adCmdText

Fact is, after login USER_NAME() acknowledges the appl_role_name to be enabled, but the permissions are not working properly. Permissions are still based on those given to the user that logged in, rather than on the application role. Any suggestions?

Thanks a lot,
Thomas"
   

- Advertisement -