Hi, I'm using XData Server and Aurelius with native driver in a local dev environment and it works great: the scenario is Microsoft SQL Server on a PC connected via LAN with SQL Server Authentication, something like this:
with AureliusConnection do begin
Params.Values['Server'] := '192.168.0.100';
Params.Values['Database'] := 'DB';
Params.Values['UserName'] := 'SYSDBA';
Params.Values['Password'] := 'manager';
Params.Values['TrustedConnection'] := 'False';
end;
as pointed out in the aurelius guide https://doc.tmssoftware.com/biz/aurelius/guide/database.html#mssql-driver-microsoft-sql-server
the TrustedConnection
is used to switch between Authentication Modes.
Now, the problem is that in production my customer uses a MSSQL server which uses authentication via Active Directory (no way to have SQL Server Authentication)... and the XData server is installed as a service on a Windows Server machine: I need to use a specific account (different from machine login) and it is possible only to use Windows Authentication mode in order to connect to the DBMS... how can I do that?
If I just use the params with TrustedConnection
set to true the UserName
and Password
are ignored and the PC and the login credential are used...
with AureliusConnection do begin
Params.Values['Server'] := 'mssqlservername';
Params.Values['Database'] := 'dbname';
Params.Values['UserName'] := 'user';
Params.Values['Password'] := 'pass';
Params.Values['TrustedConnection'] := 'True';
end;
I've also tried passing params in connection string using
Params.Values['OdbcAdvanced'] := 'UID=user;PWD=pass';
but it has no effect.
Any suggestion? Thanks in advance!