473,422 Members | 1,768 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,422 software developers and data experts.

Detecting instances of SQL Server

Hi,

I have a few projects with which I am using Access as a backend. I am
thinking about upgrading them to the .NET framework 2.0 and switching to SQL
Server. First I want to make sure I can still run the programs on a home
network environment. I want to be able to install the main SQL databases on
one computer and have other computers access those on the network. Is there
a way in VB 2005 for computers to search for instances of SQL on the network?

Thanks,
Nathan
Nov 23 '05 #1
6 1228
Check out System.Data.Sql.SqlDataSourceEnumerator.GetDataSou rces()

"Nathan M" <Na*****@discussions.microsoft.com> wrote in message
news:82**********************************@microsof t.com...
Hi,

I have a few projects with which I am using Access as a backend. I am
thinking about upgrading them to the .NET framework 2.0 and switching to SQL
Server. First I want to make sure I can still run the programs on a home
network environment. I want to be able to install the main SQL databases
on
one computer and have other computers access those on the network. Is there
a way in VB 2005 for computers to search for instances of SQL on the
network?

Thanks,
Nathan
Nov 23 '05 #2
Hi,

Add a reference to microsoft.sqlserver.smo

Imports Microsoft.SqlServer.Management.Smo

Public Class Form1
Private Sub Form1_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Dim dt As DataTable

'Get list of servers

dt = SmoApplication.EnumAvailableSqlServers(False)

For Each dr As DataRow In dt.Rows

ListBox1.Items.Add(dr(0).ToString)

Next
End Sub
End Class

Ken

----------------------------

"Nathan M" <Na*****@discussions.microsoft.com> wrote in message
news:82**********************************@microsof t.com...
Hi,

I have a few projects with which I am using Access as a backend. I am
thinking about upgrading them to the .NET framework 2.0 and switching to
SQL
Server. First I want to make sure I can still run the programs on a home
network environment. I want to be able to install the main SQL databases
on
one computer and have other computers access those on the network. Is
there
a way in VB 2005 for computers to search for instances of SQL on the
network?

Thanks,
Nathan

Nov 23 '05 #3
Hi Ken,

I can't find that reference. I've got both SQL Server 2000 and SQL Server
2005 Express installed.
Is it only available with a proper SQL 2005 version??

TIA
___________________________________________
The Grim Reaper

"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:uG**************@TK2MSFTNGP15.phx.gbl...
Hi,

Add a reference to microsoft.sqlserver.smo

Imports Microsoft.SqlServer.Management.Smo

Public Class Form1
Private Sub Form1_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Dim dt As DataTable

'Get list of servers

dt = SmoApplication.EnumAvailableSqlServers(False)

For Each dr As DataRow In dt.Rows

ListBox1.Items.Add(dr(0).ToString)

Next
End Sub
End Class

Ken

----------------------------

"Nathan M" <Na*****@discussions.microsoft.com> wrote in message
news:82**********************************@microsof t.com...
Hi,

I have a few projects with which I am using Access as a backend. I am
thinking about upgrading them to the .NET framework 2.0 and switching to
SQL
Server. First I want to make sure I can still run the programs on a home
network environment. I want to be able to install the main SQL
databases on
one computer and have other computers access those on the network. Is
there
a way in VB 2005 for computers to search for instances of SQL on the
network?

Thanks,
Nathan


Nov 23 '05 #4
I think this article might answer your second problem:
http://www.sqldbatips.com/showarticle.asp?ID=35

Hope I helped you,

Michel van den Berg

"The Grim Reaper" <gr*********@REMOVEbtopenworld.com> schreef in bericht
news:dl**********@nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com...
Hi Ken,

I can't find that reference. I've got both SQL Server 2000 and SQL Server
2005 Express installed.
Is it only available with a proper SQL 2005 version??

TIA
___________________________________________
The Grim Reaper

"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:uG**************@TK2MSFTNGP15.phx.gbl...
Hi,

Add a reference to microsoft.sqlserver.smo

Imports Microsoft.SqlServer.Management.Smo

Public Class Form1
Private Sub Form1_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Dim dt As DataTable

'Get list of servers

dt = SmoApplication.EnumAvailableSqlServers(False)

For Each dr As DataRow In dt.Rows

ListBox1.Items.Add(dr(0).ToString)

Next
End Sub
End Class

Ken

----------------------------

"Nathan M" <Na*****@discussions.microsoft.com> wrote in message
news:82**********************************@microsof t.com...
Hi,

I have a few projects with which I am using Access as a backend. I am
thinking about upgrading them to the .NET framework 2.0 and switching to
SQL
Server. First I want to make sure I can still run the programs on a
home
network environment. I want to be able to install the main SQL
databases on
one computer and have other computers access those on the network. Is
there
a way in VB 2005 for computers to search for instances of SQL on the
network?

Thanks,
Nathan



Nov 23 '05 #5
It wasn't my second problem - it was my first and only problem - I'm not the
OP!!

Thanks anyway - t'was a great help :D
_______________________________________________
The Grim Reaper

"Michel van den Berg" <mv*@promontis.nl> wrote in message
news:uq**************@TK2MSFTNGP12.phx.gbl...
I think this article might answer your second problem:
http://www.sqldbatips.com/showarticle.asp?ID=35

Hope I helped you,

Michel van den Berg

"The Grim Reaper" <gr*********@REMOVEbtopenworld.com> schreef in bericht
news:dl**********@nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com...
Hi Ken,

I can't find that reference. I've got both SQL Server 2000 and SQL
Server 2005 Express installed.
Is it only available with a proper SQL 2005 version??

TIA
___________________________________________
The Grim Reaper

"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:uG**************@TK2MSFTNGP15.phx.gbl...
Hi,

Add a reference to microsoft.sqlserver.smo

Imports Microsoft.SqlServer.Management.Smo

Public Class Form1
Private Sub Form1_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Dim dt As DataTable

'Get list of servers

dt = SmoApplication.EnumAvailableSqlServers(False)

For Each dr As DataRow In dt.Rows

ListBox1.Items.Add(dr(0).ToString)

Next
End Sub
End Class

Ken

----------------------------

"Nathan M" <Na*****@discussions.microsoft.com> wrote in message
news:82**********************************@microsof t.com...
Hi,

I have a few projects with which I am using Access as a backend. I am
thinking about upgrading them to the .NET framework 2.0 and switching
to SQL
Server. First I want to make sure I can still run the programs on a
home
network environment. I want to be able to install the main SQL
databases on
one computer and have other computers access those on the network. Is
there
a way in VB 2005 for computers to search for instances of SQL on the
network?

Thanks,
Nathan



Nov 23 '05 #6
Sorry my mistake, please don't kill me! ;)

"The Grim Reaper" <gr*********@REMOVEbtopenworld.com> schreef in bericht
news:dl**********@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com...
It wasn't my second problem - it was my first and only problem - I'm not
the OP!!

Thanks anyway - t'was a great help :D
_______________________________________________
The Grim Reaper

"Michel van den Berg" <mv*@promontis.nl> wrote in message
news:uq**************@TK2MSFTNGP12.phx.gbl...
I think this article might answer your second problem:
http://www.sqldbatips.com/showarticle.asp?ID=35

Hope I helped you,

Michel van den Berg

"The Grim Reaper" <gr*********@REMOVEbtopenworld.com> schreef in bericht
news:dl**********@nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com...
Hi Ken,

I can't find that reference. I've got both SQL Server 2000 and SQL
Server 2005 Express installed.
Is it only available with a proper SQL 2005 version??

TIA
___________________________________________
The Grim Reaper

"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:uG**************@TK2MSFTNGP15.phx.gbl...
Hi,

Add a reference to microsoft.sqlserver.smo

Imports Microsoft.SqlServer.Management.Smo

Public Class Form1
Private Sub Form1_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Dim dt As DataTable

'Get list of servers

dt = SmoApplication.EnumAvailableSqlServers(False)

For Each dr As DataRow In dt.Rows

ListBox1.Items.Add(dr(0).ToString)

Next
End Sub
End Class

Ken

----------------------------

"Nathan M" <Na*****@discussions.microsoft.com> wrote in message
news:82**********************************@microsof t.com...
> Hi,
>
> I have a few projects with which I am using Access as a backend. I am
> thinking about upgrading them to the .NET framework 2.0 and switching
> to SQL
> Server. First I want to make sure I can still run the programs on a
> home
> network environment. I want to be able to install the main SQL
> databases on
> one computer and have other computers access those on the network. Is
> there
> a way in VB 2005 for computers to search for instances of SQL on the
> network?
>
> Thanks,
> Nathan



Nov 23 '05 #7

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

Similar topics

10
by: Frances Del Rio | last post by:
pls, why is this not working? <SCRIPT language=JavaScript type="text/javascript"> var br = '<SCRIPT language=Javascript' br += 'src="js_pop.js" type="text/javascript">' br += '</SCRIPT>' var...
0
by: Suresh Kumaran | last post by:
Hi All, I have a Form which has three tab controls and each tab control has text boxes and combo boxes and Data time picker etc, totalling up to 50 instances in all three tab controls. How do...
5
by: News Admin | last post by:
I have a bunch of classes, instances of which that need to live in shared memory and be accessed by multiple processes. This means that they cannot have a vtable as the addresses in it will be in...
2
by: Rob Gibson | last post by:
Can someone please point me to some code (preferably C#, but C++ or C or VB will work) that will detect if the (local) instance of SQL Server is running on a machine or not? Many thanks! -- Rob
11
by: Mike | last post by:
Looking to find any information on how to properly configure multiple instances of DB2. This is on Win2k db2 ver 7.2. I am basically looking for information on how the multiple instance settings...
9
by: D. Shane Fowlkes | last post by:
I'm using SQL Server 2000 and on my page, I'm simply creating a SQLDataReader and filling in Labels with the retrieved (single) record. However, how can I prevent from getting errors when a field...
4
by: Chris Newby | last post by:
I realize that I can handle "SessionEnd" from global.asax ... but it appears to me that this gets called without the context of a current web request. So given the following scenario: User logs...
2
by: 440gtx | last post by:
I have a class that maintains a static std::list of its instances. Thus, due to the order of constructors ambiguity of itself and std::list, it cannot be safely instantiated until after main is...
8
by: =?Utf-8?B?UGV0ZXI=?= | last post by:
I'm trying to get a list of SQL Server Instances thru a VB.NET application. I have tried GetDataSource and SMO. I have also tried using ListSQLSvr.exe from...
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
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.