Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
emili1500
Starting Member
1 Post |
Posted - 2007-04-22 : 08:45:54
|
I'm an elementary C# developer.I find servers in local network using "SmoApplication.EnumAvailableSqlServers()" and fill a comboBox with them but I don't know how to distinguish SQLServers from SQLServer Express version.Can you help me please that what can I do? thanks a lot |
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
Posted - 2007-04-22 : 10:56:55
|
I don't think you can determine this from the method you are calling. you have to connect to the server using the Server class in SMO and then have a look at this property: Server.Information.EngineEdition (http://msdn2.microsoft.com/en-us/library/microsoft.sqlserver.management.smo.information.engineedition.aspx)alternatively, look at SERVERPROPERTY('ENGINEEDITION') - a value of 4 means it's express. (found buried on this page: http://msdn2.microsoft.com/en-us/library/ms345154.aspx)EDIT: there's also Server.Information.Edition and SERVERPROPERTY('EDITION'). it's not clear to me how these would be different from the above though. these are the properties recommended by this kb article though: http://support.microsoft.com/kb/321185 www.elsasoft.org |
|
|
mikewa
Microsoft SQL Server Product Team
84 Posts |
Posted - 2007-04-23 : 12:14:57
|
jezemine is correct that EngineEdition will return 4 for Express Edition, but I want to make it clear that SQL Express is SQL Server, the database engine is exactly the same. In general the only reason you'd need to expose the edtion of an enumerated server would be if your application enables different functionality based on the server edition, such as the ability to manage Clusters when connected to Enterprise Edition.Regards,Mike WachalSQL ExpressThis posting is provided "AS IS" with no warranties, and confers no rights.Use of included script samples are subject to the terms specified athttp://www.microsoft.com/info/cpyright.htm |
|
|
|
|
|