Re: Listing database servers on local network

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: DKC (anonymous_at_nospam.com)
Date: 04/26/04


Date: Mon, 26 Apr 2004 15:25:16 +0100

Thanks Cor,

Gave me enough input to proceed further.

Regards,
DKC

"Cor Ligthert" <notfirstname@planet.nl> wrote in message
news:OW$U%2383KEHA.268@TK2MSFTNGP11.phx.gbl...
> Hi DKC
>
> Some sample code, (I think it is only for SQL servers however I do not
know
> it because the sample is not from me)
>
> However maybe you can use it.
>
> 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
> ////
>
>



Relevant Pages

  • Re: Listing database servers on local network
    ... Some sample code, (I think it is only for SQL servers however I do not know ... Dim sqlServer As Object ... Dim sqlServer As SQLDMO.SQLServer ...
    (microsoft.public.dotnet.languages.vb)
  • RE: Redirection in code
    ... servers with info specific to their use in a unique environment. ... The groups are put in a separate database. ... sample code please. ...
    (microsoft.public.dotnet.vjsharp)
  • RE: Permissions
    ... servers are available to service the logon request. ... - Make certain that WINS database replication is successful between WINS ... Domainregistrations that are not listed in the ... If you are logged on as an administrator at a Domain Controller, ...
    (microsoft.public.win2000.security)
  • RE: Permissions
    ... >servers are available to service the logon request. ... >database does not have the proper domain registrations ... >If you are logged on as an administrator at a Domain ...
    (microsoft.public.win2000.security)
  • Re: Best way to updat TNSNames.ora in all servers
    ... We have many unix servers running Oracle ... database 9.2.0 enterprise edition. ...
    (comp.databases.oracle.server)