Custom MSSQL Server connection with native driver


This is the code shown in the Help:

Conn := TMSSQLConnection.Create( 
Manager := TObjectManager.Create(Conn);

But I have a whole slew of settings that need to go in, specifically:

  1. It's a native client
  2. It needs a username (sa)+password

So it cannot be a trusted connection.

Does anyone have a piece of code showing the right connection string? Alternatively, can I pass an empty string and use the specialised params?


I'm not sure if I understood your question? For a different connection string, just set the proper parameters and their values, they are all listed here, including UserName and Password: