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
 Transact-SQL (2000)
 Application Roles

Author  Topic 

djmack
Starting Member

8 Posts

Posted - 2004-03-03 : 14:49:31
Hello All,
I am trying to invoke an application role via an MS Access project. I created a function and put it into a Autoexec macro:
Public Function StartUp()
Dim provStr As String


'Specify connection string on OPen Method.
provStr = "Provider=sqloledb;Data Source=Cdalene4;Initial Catalog=CWETest;Integrated Security=SSPI"
MyDB.Open provStr
TSQL = "EXEC sp_setapprole 'username','pswrd'"
Application.CurrentProject.Connection.Execute TSQL
DoCmd.OpenForm "frmUserQuery"
Exit Function
End Function

The macro does what it is suppose to but when I try to select things from views in the form that pops-up I get "select permission denied on view".

Does it seem like this is something on the client side application or something on the server side?

Any ideas/suggestions would be greatly appreciated.

DM

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-03-03 : 15:43:45
Please post Access questions in the Access forum:

http://www.sqlteam.com/forums/forum.asp?FORUM_ID=3

Tara
Go to Top of Page

djmack
Starting Member

8 Posts

Posted - 2004-03-03 : 16:01:31
Sorry, I'll post it there
Go to Top of Page
   

- Advertisement -