It seems so often that security is what stumps me. My situation:
1. Running an Excel spreadsheet with VBA code that executes a stored procedure on our SQL server.
2. We have an SQL login called abcdefg that has been given Execute rights to the stored procedure.
3. The connection string for the recordset specifies "User ID=abcdefg;Password=tuvwxyz;".
4. When I run the VBA macro, it fails with an error "System Error &H80040E21". When I remove the "User ID=..." from the connection string and replace it with "Integrated Security=SSPI;", it works successfully.
While it's nice that it works, it's not acceptable in our environment because using Integrated Security means each user has to be given rights on the SQL server. And besides, I've always thought one reason for using the "User ID/Password" construct is that the calling code passes the specified credentials, and the person's credentials are not involved.
Am I missing something obvious here? Thanks in advance for any help you can pass along.
1. Running an Excel spreadsheet with VBA code that executes a stored procedure on our SQL server.
2. We have an SQL login called abcdefg that has been given Execute rights to the stored procedure.
3. The connection string for the recordset specifies "User ID=abcdefg;Password=tuvwxyz;".
4. When I run the VBA macro, it fails with an error "System Error &H80040E21". When I remove the "User ID=..." from the connection string and replace it with "Integrated Security=SSPI;", it works successfully.
While it's nice that it works, it's not acceptable in our environment because using Integrated Security means each user has to be given rights on the SQL server. And besides, I've always thought one reason for using the "User ID/Password" construct is that the calling code passes the specified credentials, and the person's credentials are not involved.
Am I missing something obvious here? Thanks in advance for any help you can pass along.