Export (0) Print
Expand All

Server Constructor ()

Initializes a new instance of the Server class.

Namespace: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

public Server ()
public Server ()
public function Server ()

Updated text:

The default constructor initializes any fields to their default values.

This namespace, class, or member is supported only in version 2.0 of the Microsoft .NET Framework.


'Connect to the local, default instance of SQL Server.
Dim srv As Server
srv = New Server
'The connection is established when a property is requested.
Console.WriteLine(srv.Information.Version)
'The connection is automatically disconnected when the Server variable goes out of scope.

Development Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.

Target Platforms

Release

History

New content:
  • Added code sample to the Example section.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft