How to detect the status of the SQL Server Express service or start the SQL Server Express service by using Visual Basic or Visual C# (912426)
The information in this article applies to:
- Microsoft Visual Studio 2005 Standard Edition
- Microsoft Visual Studio 2005 Professional Edition
- Microsoft SQL Server 2005 Express Edition
SUMMARYMicrosoft SQL Server 2005 Express Edition is a service-based product. If you build
Microsoft Visual Studio 2005 applications on SQL Server 2005 Express Edition, you can detect the status
of the SQL Server Express service when you start the
application. You can use the ServiceController class to do the following: - Detect the status of the SQL Server Express service.
- Start the SQL Server Express service if it is not started correctly.
Note The default installation of SQL Server 2005 Express Edition uses an instance
name of SQLEXPRESS. This instance name maps to the service name of
MSSQL$SQLEXPRESS. REFERENCESFor more information about the "System.ServiceProcess" namespace, visit the following Microsoft Developer Network (MSDN) Web site:
For
more information about Visual Studio .NET, visit the following MSDN Usenet newsgroups:
Modification Type: | Major | Last Reviewed: | 1/5/2006 |
---|
Keywords: | kbprb kbhowto KB912426 kbAudDeveloper kbAudITPRO |
---|
|