Basically, is it possible to identify if some-one hooks up my program to SQL server Compact or Express Edition? I want to be able to restrict different versions of my product to different versions of SQL Server.
After connection to a database, you can always run the T-Sql:
SELECT SERVERPROPERTY ('edition')
This should give you the different editions
Other useful info may come from:
SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel')
Run this SQL statement
SELECT @@VERSION
and it'll give you a ReultSet (one column as a String) with the version like this
Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05 Copyright (c) 1988-2003 Microsoft Corporation Standard Edition on Windows NT 5.0 (Build 2195: Service Pack 4)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With