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 |
tonisala
Starting Member
1 Post |
Posted - 2008-11-23 : 11:01:31
|
Hello,I'm developping an application using Visual Basic 6.0 that must run in computers with SQLEXPRESS 2005 instances and some others with MSDE 2000. The application has to know if the SQL Server that the computer is running is 2000 or 2005 as the connection string is different. Is there a 'smart' way to do this ? I know there are ways like .ini files or registry keys to do this but I woulnd't like to do it this way. Right now, I read the registry key HKLM\Software\Microsoft\SQL Server\... and if the instance I get is SQLEXPRESS I assume it's 2005 but I'm sure there must be another way (smarter) to do this. Thanks a lot. |
|
tmitch
Yak Posting Veteran
60 Posts |
Posted - 2008-11-27 : 21:15:40
|
If you can use the SMO framework (Microsoft.SqlServer.Management.Smo), you can create a connection to the server and read in the information from that instance, including the version ID.---------------------Tim Mitchellwww.BucketOfBits.com |
|
|
|
|
|