Custom MSSQL Server connection with native driver

Hello!

This is the code shown in the Help:

Conn := TMSSQLConnection.Create( 
  'Server=.\SQLEXPRESS;Database=Northwnd;TrustedConnection=True');
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?

Thanks!

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:

https://doc.tmssoftware.com/biz/aurelius/guide/database.html#mssql-driver-microsoft-sql-server