The Start method starts the Microsoft® SQL Server™ service, optionally connecting the SQLServer object on successful start.
object.Start( StartMode , [ Server ] , [ Login ] , [ Password ] )
Part | Description |
---|---|
object | Expression that evaluates to an object in the Applies To list. |
StartMode | When True, an attempt is made to connect on successful start. When False, no attempt is made to connect after successful start. |
Server | Optional. A string specifying the SQL Server installation started by name. |
Login | Optional. A string specifying a SQL Server login used when an attempt is made to connect after successful start (StartMode is True). |
Password | Optional. A string specifying a SQL Server password used for login validation when an attempt is made to connect after successful start (StartMode is True). |
The Start method can only be used on a SQLServer object not connected to a SQL Server installation.
Specify the SQL Server service to start by using the Name property of the SQLServer object, or the optional Server argument of the Start method. Using the Server argument overrides any previous specification made by using the Name property.
HRESULT Start(
BOOL fConnect,
SQLDMO_LPCSTR Server = NULL,
SQLDMO_LPCSTR Login = NULL,
SQLDMO_LPCSTR Password = NULL);