SQL connect string

Clarion 11.0.13630
MS SQL backend
FM3 5.59

For connecting to the MS SQL server, we have a user who wants to use Windows Authentication.
He told me i have to use SSPI (Security Support Provider Interface) in the connect string.

I’m not familiar with this, does anyone know what the connect string should be for this?
What happens now when i fill in Server, Database name and port is that the program freezes and doesn’t connect.

Thanks in advance

Normally you do not need to pass UserName and Password in your connection string but should add this to the end:

;Trusted_Connection=Yes

.... glo:Owner = clip(glo:Owner) & ';Trusted_Connection=Yes'

where glo:Owner is your variable with a standard connection string

so it should look like:
ServerName,Database_Name,,;Trusted_Connection=Yes

and of course, your Server security should allow that trusted connection (Windows Authentication)

1 Like

MS SQL servers always allow Windows Authentication. It is SQL Authentication that is optional.

Integrated Security=[SSPI or true] is equivalent to Trusted_Connection=Yes (according to connectionstrings.com). That maybe what the OP’s user was talking about.

2 Likes

works for us, we use it a lot.