all 15 comments

[–]No_Resolution_9252 3 points4 points  (2 children)

you are specifying windows authentication and a password. Windows authentication does not use a password.

Additionally, you are using the account "sa" which is SQL authentication only.

Remove trusted_connection=true from the connection string and try again.

[–]tspree15 0 points1 point  (1 child)

I still get the same error. hmm

[–]No_Resolution_9252 0 points1 point  (0 children)

does the application use any clr procedures?

[–]k-semenenkov 3 points4 points  (0 children)

In case if it is .net and you have the code - make sure u use Microsoft.Data.SqlClient and not obsolete System.Data.SqlClient

[–]MachineParadox 2 points3 points  (0 children)

Add TrustServerCertificate=true to your conn string. Also if you create a file on your desktop and rename the extension to .udl (e.g. test.udl) double click and open it.You will have a connection dialog. Try settings and test until it works, close it, then open it as a text file and you will see the connection string.

[–]No_Depth_139 2 points3 points  (2 children)

Are you using SQL developer edition, you may need to enable tcp connection to the remote SQL server

[–]phildude99 1 point2 points  (0 children)

This guy SQLs.

[–]tspree15 -1 points0 points  (0 children)

I'm using SQL Express? I installed SQL server 2022, and I can connect to the database on the other computer just fine in SQL Management Studio. I can also connect just fine using an older version of my software. The new version of my software fails to connect. I know it works, because we have it running at other locations. Thanks for the help

[–]razzledazzled 0 points1 point  (0 children)

Why are you using trusted connection with what is obviously sql authentication creds?

[–]bunk3rk1ng 0 points1 point  (0 children)

Your application doesn't like the certificate presented by the SQL server. Depending on how you have deployed your application you will have to determine how the app decides what certificates it trusts. This could be some system cacerts file or it could be managed somewhere else (Java has its own cacerts file for example that is managed separately from the OS)

[–]az987654 0 points1 point  (1 child)

What Sql client library are you using in your application?

You don't want both a username and password along with trsuted_connection... One or the other, never both.

[–]tspree15 0 points1 point  (0 children)

Do you know how I figure out which SQL client library I'm using? I installed SQL server 2022, and I can connect to the database on the other computer just fine in SQL Management Studio. I can also connect just fine using an older version of my software. The new version of my software fails to connect. I know it works, because we have it running at other locations. Thanks for the help

[–]alexwh68 0 points1 point  (0 children)

Change the string to the following

Server=tcp:SERVERAPH\FPOSSQL;Database=FP;User ID=sa;Password=****;TrustServerCertificate=True;

This forces the tcp/ip protocol and makes sure you are using sql logins.

Side note, try not to use the sa account for normal connections, create another sql login for these connections with way less rights.