all groups > sql server msde > june 2004 >
You're in the

sql server msde

group:

Setting the AutoStart property of SQLServer object


Setting the AutoStart property of SQLServer object lori.pearsall7 NO[at]SPAM gte.net
6/25/2004 3:17:38 PM
sql server msde:
I'm executing the following block of SQLDMO code :

if (this.sqlServer.Status ==
SQLDMO.SQLDMO_SVCSTATUS_TYPE.SQLDMOSvc_Running)
{
this.sqlServer.LoginSecure = true;
this.sqlServer.Connect(this.strDatabaseName, optional, optional);
this.sqlServer.AutoStart = true;
this.sqlServer.DisConnect();
this.sqlServer = null;
return true;
}
(sqlServer is a SQLDMO.SQLServer2Class that was previously initialized
and successfully started up a "stopped" SQL instance - so it's a valid
object)

I've stepped through and watched it set the AutoStart property to
true, yet I'm not seeing the Auto-start change in the Service Manager
for the SQL Server service. Is there something else I need to do??

RE: Setting the AutoStart property of SQLServer object FinallyInSeattle
6/26/2004 2:28:01 PM
Found the answer ... needed to :

this.sqlServer.Registry.AutostartServer = true;



[quoted text, click to view]
AddThis Social Bookmark Button