Forum > Databases

[Solved] MSSQLConnection with windows authentification

(1/1)

Zoran:
By following the wiki, I installed FreeTDS dll files and I managed to connect to MSSQLServer using sql server login.

However, I don't know how to connect using Windows authentification. Is it possible at all with MSSQLConnection?

Remy Lebeau:
Simply leave the UserName and Password properties blank.  This is stated in the TMSSQLConnection documentation:

https://www.freepascal.org/docs-html/fcl/mssqlconn/tmssqlconnection.username.html
https://www.freepascal.org/docs-html/fcl/mssqlconn/tmssqlconnection.password.html


--- Quote ---TMSSQLConnection specific: if you don't enter a UserName and Password, the connector will try to use Trusted Authentication/SSPI (on Windows only).

--- End quote ---

SSPI is how MSSQL uses Windows authentication.

Zoran:
Ah, so simple, I missed it in docs.  :-[
Thank you, Remy, yes it works.

Navigation

[0] Message Index

Go to full version