[Solved] Connect named SQL Server instance in Direct Mode

[Solved] Connect named SQL Server instance in Direct Mode

Hello.

I am currently testing the migration with SDAC from MS OLE DB to Direct Mode. When connecting to the SQL Server, I get problems when I try to access a named instance, such as "(local)\dunit". If I use only "(local)" then the connection can be established successfully. With MS OLE DB both variants work.
  1. var q := TMSQuery.Create(nil);
  2. try
  3.   var c := TMSConnection.Create(q);
  4.   c.Server := '(local)\dunit';
  5.   c.Authentication := TMSAuthentication.auWindows;
  6.   c.Options.Provider := TMSProvider.prDirect;
  7.   q.Connection := c;
  8.   q.SQL.Text := 'select * from sys.sysprocesses;';
  9.   q.Open();
  10. finally
  11.   q.Free;
  12. end;