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

Server list

Hi,

is it possible to get SQL Server list in VB.NET whitout SQLDMO, only with
..NET functions?

Sergio
Nov 20 '05 #1
5 1335
* "Kurt" <se*********@hotmail.com> scripsit:
is it possible to get SQL Server list in VB.NET whitout SQLDMO, only with
.NET functions?


AFAIK, you can't.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2
Hi Kurt,

What do you mean by that?
is it possible to get SQL Server list in VB.NET whitout SQLDMO, only with
.NET functions?


Cor
Nov 20 '05 #3
* "Cor Ligthert" <no**********@planet.nl> scripsit:
What do you mean by that?


???
is it possible to get SQL Server list in VB.NET whitout SQLDMO, only with
.NET functions?


--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #4
> * "Cor Ligthert" <no**********@planet.nl> scripsit:
What do you mean by that?


???
is it possible to get SQL Server list in VB.NET whitout SQLDMO, only with .NET functions?

This looks for me so much to Net code. However you got me with that C what
do you think this code is?
:-)

Cor

\\\
Private Function LoadSQLServerList() As Integer
Dim serverIndex As Integer
Dim sqlServers As SQLDMO.NameList
Dim sqlServer As Object
' Get a list of servers
sqlServers = New SQLDMO.Application().ListAvailableSQLServers()
' Iterate through the server names, and add it to the combobox
For Each sqlServer In sqlServers
If Not sqlServer Is Nothing Then
cboServers.Items.Add(sqlServer)
End If
Next

' Send back the count of servers
LoadSQLServerList = cboServers.Items.Count
'table list in a ser
Dim sqlServer As SQLDMO.SQLServer
Dim sqlDB As Object
sqlServer = New SQLDMO.SQLServer()
Try
' Connect to your database with userID and password
sqlServer.Connect(cboServers.Text, txtUserID.Text,txtPassword.Text)
' Check for database names in the server
' This loop adds the database name to another combobox
For Each sqlDB In sqlServer.Databases
If Not sqlDB.Name Is Nothing Then
cboDatabases.Items.Add(sqlDB.name)
End If
Next
Catch Exp As Exception
MsgBox(Exp.ToString)
End Try
////
Nov 20 '05 #5
* "Cor Ligthert" <no**********@planet.nl> scripsit:
* "Cor Ligthert" <no**********@planet.nl> scripsit:
What do you mean by that?


???
is it possible to get SQL Server list in VB.NET whitout SQLDMO, only with .NET functions?

This looks for me so much to Net code. However you got me with that C what
do you think this code is?


;-)

I throught the OP was looking for a method to list the servers which is
part of the .NET framework.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #6

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

Similar topics

1
by: srihari | last post by:
Hai, I am trying to install IBM DB2 8.1 on Red Hat linux 8.0. My machine is Intel XEON 64bit. The installation went well except for the creation of tools catalog. When I tried to install the tools...
5
by: Parahat Melayev | last post by:
I am trying to writa a multi-client & multi-threaded TCP server. There is a thread pool. Each thread in the pool will handle requests of multiple clients. But here I have a problem. I find a...
1
by: Piotrek Stachowicz | last post by:
Hi, I'd like to display list of all MS SQL servers which are available on the network (I write application which uses database located on one of the machines in my LAN). Has anyone got any idea...
0
by: Kumar | last post by:
Hi Folks, I would like to develop one custom application using asp.net,C#,SQL server for tracking all our company servers. Most of the functionality is similar to HP Systems Insight Manager ...
18
by: UJ | last post by:
Folks, We provide custom content for our customers. Currently we put the files on our server and people have a program we provide that will download the files. These files are usually SWF, HTML or...
4
by: jens Jensen | last post by:
Hello, I was given the task to build a .Net client that will talk to IBM integration server via HTTP post. The idea is that each http packet exchange should be authenticated via X09 "client...
0
by: Derrick | last post by:
Hello all; This is going to be a bit long...sorry... I am about to start out on a small scale client/server type system. The server will collect data from various sources (custom hardware over...
1
by: gnusmsa | last post by:
ASP.NET 2.0 (C#) application Using Windows authentication and impersonation Windows Server 2003 (IIS6) Server is a member server on a domain Logged into server as a domain user that is in the...
1
by: eblackmo | last post by:
I have a test network consisting of four servers running windows 2003 server R2 SP2. I have set up a domain which functioned correctly for about a day and a half until the other servers decided they...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.