You are here: Re: SQLDMO - Getting 'Local' Server name « MsSQL Server « IT news, forums, messages
Re: SQLDMO - Getting 'Local' Server name

Posted by Alex on 06/21/06 15:55

Thanks Chris.

You pointed me in the right direction.

For reference this is how it worked (in VB6):

Dim oSQLServer As New SQLDMO.SQLServer
Set oSQLServer = New SQLDMO.SQLServer

oSQLServer.LoginSecure = True
oSQLServer.Connect "(local)"

strLocalName = oSQLServer.HostName

oSQLServer.Disconnect
Set oSQLServer = Nothing



cheers

Alex

Chris Cheney wrote:
> "Alex" <alex_seymour@lineone.net> wrote in
> news:1150813848.497464.171900@i40g2000cwc.googlegroups.com:
>
> >
> > Hi,
> >
> > I am new to the mysteries of SQLDMO.
> >
> > I have written a program whereby the user can select which SQL server
> > to connect to on the Network and this works fine.
> > I am using the SQLDMO.Application.ListAvailableSQLServers routine and
> > this works fine.
> >
> > However, the Server on the users machine appears as 'Local'
> >
> > I need to display the server name as the actual server name instead of
> > 'Local'
> >
> > Any ideas how to do this with SQLDMO.
>
> Create an instance of the SQLServer object. You then have the choice of the
> following properties:
>
> Name this will give you the "(local)" name
> HostName
> TrueName
> NetName
>
> See SQLDMO in Books Online, Objects/S/SQLServer

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация