.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
Post a Comment