> Good day to you,
>
> I have a SQL server that I am trying to connect to using this connection string.
>
> SQLSTRINGCONNECT("Driver=SQL Server;Server=MPISWEB01\MPIORG;Database=Maximo52;Trusted_Connection=Yes")
>
> I have written an application that, when run as a network administrator equivalent, will connect to SQL server no problem. When the application is run as a regular user, I get a connectivity error to SQL server, specifically from the SQLStringConnect function
>
> When I do an aerror() to get the error message, I am given the following:
> Connectivity error: [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'MPI\Itszero'.
>
>
> MPI is my windows domain, and Itszero is the user I was logged into the network with
>
>
>
> So I changed the connection string and got rid of the trusted connection, and made one with Authentication, and I typed in the username and password.
>
> "Driver=SQL Server;Server=MPISWEB01\MPIORG;Database=Maximo52;uid =;pwd = "
>
> After changing the connection string I keep getting the same error. It's like SQL Server doesn't care that I am providing SQL authentication to it, it continues to use windows authentication. My server is set to allow both windows and SQL authentication.
>
>
> Anyone have any solutions for this, or an idea on a path forward. possibly missing network rights?
>
>
> Thanks in advance,
>
> Travis Pick
I would recommend using windows authentication where possible. Here MPI\tszero could logon with windows authentication if it is allowed to do so in SQL server. You woild need to create a login and/or map a user to that login if you use UID/PWD approach. In your sample you are only adding UID and PWD but no UID/PWD is specified. Do you remember sa password (you should, would the worst thing to forget it)? Assume your sa password is pass, then with UID and PWD your connection string would be:
"Driver=SQL Server;Server=MPISWEB01\MPIORG;Database=Maximo52;UID=sa;PWD=pass"
PS: Seeing 'web' in server name I think it is a web server where using windows authentication is more important IMHO.
Cetin Basoz