Click here to Skip to main content
15,920,468 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello

How understand than sqlexpress2008 setuped on a system?
or not setuped yet
Posted

There can be various ways in which you can check if a particular application is installed or not. Easiest would be, you can check in 'Control Panel -> Add/Remove programs' - if program is installed, you should be able to uninstall from there.


In case, you want to check it via code, look here - example VB.NET[^]
 
Share this answer
 
Comments
Wendelius 22-Dec-11 9:51am    
Good link, 5.
faezun 22-Dec-11 10:05am    
thanks

but i have via code c#
If you want to check that if SQL server is available then use SqlDataSourceEnumerator[^] as Mika said and if you want to see if they are express version or not try to run this query on them :

SQL
select @@VERSION


If there was and Express Edition in output string then it should be an express edition.

But also consider using an install program for your program from third parties because they handle all prerequisites for your program and you will not worry for this issues any more.
 
Share this answer
 
Comments
Wendelius 22-Dec-11 12:12pm    
Good addition, 5. And congrats for 10K :)
Amir Mahfoozi 22-Dec-11 12:15pm    
Thank you Mika. It was an easy task to make it 2 digits but for making it 3 digits its a very long long way ! :-&
faezun 6-Mar-12 7:06am    
if ((select @@VERSION ) like '%Express%')
The question is not quite clear but you can check for example from Windows Services using Control Panel if SQL Server service exists.

If you want to do this programmatically, you can use for example SqlDataSourceEnumerator[^] to list all existing instances.

And possibly (depending on your needs) you can simply try to connect to an instance using SqlConnection[^]
 
Share this answer
 
Comments
faezun 22-Dec-11 10:07am    
thanks

i have a c# code. can help me?
Wendelius 22-Dec-11 10:25am    
What are you uactually trying to do from those choices?
faezun 22-Dec-11 10:48am    
i have a c# program with sqlexpress database
customer must first install sqlexpress then run program
if customer don't setup sqlexpress, show a message
Wendelius 22-Dec-11 10:57am    
If you're actually trying to deploy SQL Server Express with your application, have a look at http://msdn.microsoft.com/en-us/library/bb264562(v=sql.90).aspx[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900