473,383 Members | 1,922 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

EnumAvailableSqlServers and sqlexpress

Hi

I am trying to find find the sqlserver express that is running on my
computer using:
DataTable dtSQLServers = SmoApplication.EnumAvailableSqlServers(false);

It returns one row that holds the name "Office1" but the sqlserver is:
"Office1\SQLExpress"

If I try to connect to "Office1" I get a very long errormessage while if I
connect to "Office1\SQLExpress" it works fine.

How do I get EnumAvailableSqlServers to return the "correct" name?

Thanks Torben
Apr 17 '07 #1
4 4332
"Torben Laursen" <To****@newsgroups.nospamwrote in message
news:uE**************@TK2MSFTNGP04.phx.gbl...
Hi

I am trying to find find the sqlserver express that is running on my computer using:
DataTable dtSQLServers = SmoApplication.EnumAvailableSqlServers(false);

It returns one row that holds the name "Office1" but the sqlserver is:
"Office1\SQLExpress"

If I try to connect to "Office1" I get a very long errormessage while if I connect to
"Office1\SQLExpress" it works fine.

How do I get EnumAvailableSqlServers to return the "correct" name?

Thanks Torben


What column are you looking at?

Willy.

Apr 17 '07 #2
I am looking at Name and server.
I have a second office computer on the network that also runs sqlexpress and
the code returns the correct name for that one.

First row: (network computer)
Server: Office3
Name: Office3\\SQLexpress

Second row (computer where the code runs)
Server: Office1
Name: Office1

Torben
"Willy Denoyette [MVP]" <wi*************@telenet.bewrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
"Torben Laursen" <To****@newsgroups.nospamwrote in message
news:uE**************@TK2MSFTNGP04.phx.gbl...
>Hi

I am trying to find find the sqlserver express that is running on my
computer using:
DataTable dtSQLServers = SmoApplication.EnumAvailableSqlServers(false);

It returns one row that holds the name "Office1" but the sqlserver is:
"Office1\SQLExpress"

If I try to connect to "Office1" I get a very long errormessage while if
I connect to "Office1\SQLExpress" it works fine.

How do I get EnumAvailableSqlServers to return the "correct" name?

Thanks Torben



What column are you looking at?

Willy.

Apr 18 '07 #3
"Torben Laursen" <To****@newsgroups.nospamwrote in message
news:u7**************@TK2MSFTNGP06.phx.gbl...
>I am looking at Name and server.
I have a second office computer on the network that also runs sqlexpress and the code
returns the correct name for that one.

First row: (network computer)
Server: Office3
Name: Office3\\SQLexpress

Second row (computer where the code runs)
Server: Office1
Name: Office1
Does this mean that the instance column is empty?

Willy.

Apr 18 '07 #4
Yes, the information is:
First row: (network computer)
Server: Office3
Instance: Sqlexpress

Name: Office3\\SQLexpress
Second row (computer where the code runs)
Server: Office1
Name: Office1
Instance: {}

Torben

"Willy Denoyette [MVP]" <wi*************@telenet.bewrote in message
news:uK**************@TK2MSFTNGP06.phx.gbl...
"Torben Laursen" <To****@newsgroups.nospamwrote in message
news:u7**************@TK2MSFTNGP06.phx.gbl...
>>I am looking at Name and server.
I have a second office computer on the network that also runs sqlexpress
and the code returns the correct name for that one.

First row: (network computer)
Server: Office3
Name: Office3\\SQLexpress

Second row (computer where the code runs)
Server: Office1
Name: Office1

Does this mean that the instance column is empty?

Willy.

Apr 19 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: lbolognini | last post by:
Hi all, I've got a PostgreSQL schema, how can I import it in SqlExpress? What's the best tool for administering Sql Express. Thanks, Lorenzo
3
by: andrewcw | last post by:
I am trying to use the NorthWind database or anything with SQLEXPRESS on VS 2005 RC. I can see SQLExpress started with the tool SQL Server Configuration Manager. But when i select DataBase | New...
2
by: Crash | last post by:
Windows XP MS SQLExpress VS 2003 ..NET 1.x SP1 {for Application} ..NET 2.0 {for SQLExpress} MS Enterprise Library June 2005 This works from a command prompt osql -E -S localhost\SQLEXPRESS
13
by: Matt Fielder | last post by:
First off, if this is better posted in another group that qualifies as a manged group, please let me know. I currently have an application written in VB.Net using MSDE as the database. Current...
2
by: =?Utf-8?B?Q2hhcmxpZQ==?= | last post by:
Hi, I am using System.Diagnostics,Process.Start to execute sqlcmd.exe the second parameter of the Start method is the arguements to pass to sqlcmd Because I am using SQLExpress the string...
2
by: Michel Vanderbeke | last post by:
Hello, I have a program, running in several places, using SQLEXPRESS as database. The different places are stand-alone, and not connected to a network. Regulary, I have to apply changes on...
5
by: =?Utf-8?B?bXVzb3NkZXY=?= | last post by:
Hi, I wonder if someone could shed some light on this one for me. I have developed a web app in VS2005 with the built in server. It uses an sql database, everytihng works. I need to test it...
1
by: Aykut Canturk | last post by:
Can I use SqlExpress2005 AttachDatabase feature with classic ADO connections in my .asp pages ? But I need ConnectionString. Although I searched the web for couple of weeks I still coulnd't find...
4
by: jtammyg | last post by:
Hi! I have the following snippet that gives the name of the sql servers installed: Private Sub MainForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.