Robin,
You can use "." to mean local also.
Alternatively you can use Environment.MachineName to get the name of the
machine you are on.
For SQL Server I think I would favor "." over Environment.MachineName,
especially in "hard coded" connection strings, as I can use "." at compile
time & not worry about building the string later...
Hope this helps
Jay
"Robin Tucker" <id*************************@reallyidont.com> wrote in
message news:cu*******************@news.demon.co.uk...
I'm fetching a list of SQL servers on a domain using a function that
returns strings, including "(local)" for the local machine (if it has an
SQL server on it). Now, presumably in a different locale, the word
"(local)" will be something else. I cannot thus compare the string to see
if its "(local)" and replace it with Environment.MachineName. So I need a
way of determining if a given string is the local machine.
ie.:
Dim theString as ConnectionName = GetServerName() ' may return "(local)"
Dim bIsLocal as boolean = somefunc.IsLocal ( theString )
Any ideas?
Thanks
Robin