[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.
- var q := TMSQuery.Create(nil);
- try
- var c := TMSConnection.Create(q);
- c.Server := '(local)\dunit';
- c.Authentication := TMSAuthentication.auWindows;
- c.Options.Provider := TMSProvider.prDirect;
- q.Connection := c;
- q.SQL.Text := 'select * from sys.sysprocesses;';
- q.Open();
- finally
- q.Free;
- end;