Check if Sql Server exist

Posted on 2004-09-01
Last Modified: 2013-11-14
Hi ,
i'm an access programmer
how i could check MSDE is installed and sql sever exist

every suggestion will be appriciated
Question by:ppk54ir
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2

Accepted Solution

IceColdas earned 125 total points
ID: 11951185
oh, simply put the connection code in a try catch
so u dont need to search for further ways to see if the database exists
try {
        //connect to data base
catch (Exception exc)

Assisted Solution

Spansule earned 125 total points
ID: 11952839
It kind of depends on what you're up to, and what language you're using. Here's a snippet of C# code that will retrieve a list of all the SQL Servers available for connection:

// This part retrieves a list of all of the available SQL Servers that can be connected to
SQLDMO.Application sql = new SQLDMO.ApplicationClass();
      SQLDMO.NameList servers = sql.ListAvailableSQLServers();
      IEnumerator ServerEnumerator = servers.GetEnumerator();
      while (ServerEnumerator.MoveNext())
            // Do stuff with ServerEnumerator.Current;
      sql = null;

Otherwise you can use the registry to find out what versions of SQL Server are installed. Try the following key:


This post lists some other keys to check for different versions of SQL Server:

You can also identify which MSI was used for installation:


Expert Comment

ID: 12162126
I just noticed that he said he was an Access programmer. My comment probably didn't make too much sense in that context then.

I don't have any issues with the topic being closed.

Expert Comment

ID: 12177667
Actually this is exactly what he said :
Hi ,i'm an access programmer
how i could check MSDE is installed and ### sql ### sever exist
Probably got his answer and accepted none

Expert Comment

ID: 12179524
LOL maybe I read it right the first time.

In that case I think my answer was pretty good. :)

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
Create a Windows 10 custom Image with custom task bar and custom start menu using XML for deployment.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question