.net - Getting the default SQL Server directory in VB.Net -


I think SQL Server is located on the default path for files:

C : \ Program files \ Microsoft SQL Server \ MSSQL.1 \ MSSQL \ DATA

Is there any way to read the default directory with the .NET framework?

The following is available to you in the installation folder (eg. C: \ Program Files \ Microsoft SQL Server \ MSSQL .1 \ MSSQL ) for the SQL Server that you specify in the string:

  String as a slow connection string = "whatever ..." dim server connection As a server connection (connection), the dim server as the new server (server connection) in the form of a slow installation directory string = server.Information.RootDirectory  

There are tons.

The MSDN docs for the root directory can be found Specifying the correct SQL Server instance in the given connection string for ServerConnection will ensure that you obtain the directory for the correct instance.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -