Application roles through VBA

By Dynic-IT ·

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=<SERVER>;Initial Catalog=<DATABASE>;Integrated Security=SSPI;UID=<Application Role>;Pwd=<Passwprd>;"

Dim rs As ADODB.Recordset
Dim objConnection As New ADODB.Connection
objConnection.Open <CONNECTION STRING>
Set rs= objConnection.Execute("<SELECT STATEMENT>")


This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Share your knowledge

Related Discussions

Related Forums