Skip to content
Advertisement

VBA Runtime Error when connection to SQL Database

I’m trying to connect to a SQL Server from multiple PCs in the same domain.

When using the following code:

conn.Open returns the error:

Error on login for the user ‘XXXX’

Advertisement

Answer

The issue is because you are using a named user with Integrated Security. These two modes are incompatible.

Try removing Integrated Security=SSPI:

Or the named user:

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement