Application roles through VBA - TechRepublic
Question
April 6, 2009 at 07:34 AM
dynic-it

Application roles through VBA

by dynic-it . Updated 17 years, 3 months ago

Hello

Can someone please help. I am trying to connect to a SQL2005 database through VBA in Excel. I have set up a Application Role with permission to select from my database, and it works fine from my computer, but it doesn’t work on a regular users computer.

I’m a full administrator, and the users computer gives a “Type mismatch” error when I try and open the connection, which makes me think that the logon is using Windows authentication and ignoring the Application Role

Connection String:
“Provider=SQLOLEDB;server=;Initial Catalog=;Integrated Security=SSPI;UID=;Pwd=;”

Code:
Dim rs As ADODB.Recordset
Dim objConnection As New ADODB.Connection
objConnection.Open
Set rs= objConnection.Execute(“

Thanks

This discussion is locked

All Comments