For Programmers: Free Programming Magazines  


Home > Archive > Visual Basic Database > May 2005 > SQLDMO.NameList returns Oracle??









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author SQLDMO.NameList returns Oracle??
Graham R Seach

2005-05-18, 4:04 am

Hi guys,

I need to know whether SQLDMO.NameList returns only SQL Server instance
names, or whether it returns ALL server instances in the domain (including
Oracle).

I'm doing a project for a government department (an Oracle shop). I have
been building a system that backends to SQL Server 2000 Ent. I had approval
to do so, but now, IBM/GSA (who manage the network infrastructure) have said
"no" to SQL Server. I'm almost finished the damned project, so I need
ammunition to take into a meeting.

The following code returns a bunch of instance names, which I assume (given
that the documentation supports my contention) to be SQL Server instances,
not Oracle. If as this list suggests, there are already SQL Server instances
in the domain, I can go into the meeting with a big argument to counter
their claim of an homogenous Oracle-only environment.

Dim oServers As SQLDMO.NameList
Dim oServer As Variant
Dim sServerNames() As String
Dim iCtr As Integer

iCtr = 0

Set oServers = SQLDMO.Application.ListAvailableSQLServers

'Iterate through the server names, and add them to the return string
For Each oServer In oServers
If Not IsNull(oServer) Then
iCtr = iCtr + 1
ReDim Preserve sServerNames(iCtr)
sServerNames(iCtr) = oServer
End If
Next oServer

- Graham



Graham R Seach

2005-05-18, 4:04 am

Sue,

Thanks. The documentation I referred to was from Books Online. The
ListAvailableSQLServers method name is pretty clear, but I just want to make
absolutely sure, 'cause if I go into the meeting without having the facts
100% correct, I'm going to get shot down. These Oracle types...well, you
know what I'm up against!

- Graham

"Sue Hoegemeier" <Sue_H@nomail.please> wrote in message
news:eu5l81h51dlc0n7dm31t78q542k0ds65fr@
4ax.com...
> Just SQL Server instances. You can find more information in
> books online under:
> ListAvailableSQLServers Method
>
> -Sue
>
> On Wed, 18 May 2005 10:15:59 +1000, "Graham R Seach"
> <gseach@NOSPAM_pacificdb.com.au> wrote:
>
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com