Question
-
Topic
-
Application Roles in VBA
LockedHello
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=myserver;Initial Catalog=mydatabase;Integrated Security=SSPI;UID=myapplicationrole; Pwd=mypassword;”Code:
Dim rs As ADODB.Recordset
Dim objConnection As New ADODB.Connection
objConnection.Open myconnectionstring
Set rs= objConnection.Execute(“SELECT STATEMENT”)Thanks