By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,564 Members | 810 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,564 IT Pros & Developers. It's quick & easy.

sql server server name

P: n/a
Is there a way - through the api - to get the name of a client's sql server
server name and then use that as input to the connection object, such that
even tho' my test server name is one thing, when the app is on my client's
machine (network server), the connection will be made without my having to
change all my connection strings each time for each client?

Thanks for any help.

Bernie Yaeger
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
* "Bernie Yaeger" <be*****@cherwellinc.com> scripsit:
Is there a way - through the api - to get the name of a client's sql server
server name and then use that as input to the connection object, such that
even tho' my test server name is one thing, when the app is on my client's
machine (network server), the connection will be made without my having to
change all my connection strings each time for each client?


You will find a *VB6* implementation here:

<http://www.mvps.org/vbnet/index.html?code/network/netserverenumver.htm>

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

P: n/a
As always, tx Herfried.

Bernie

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:uG**************@TK2MSFTNGP10.phx.gbl...
* "Bernie Yaeger" <be*****@cherwellinc.com> scripsit:
Is there a way - through the api - to get the name of a client's sql server server name and then use that as input to the connection object, such that even tho' my test server name is one thing, when the app is on my client's machine (network server), the connection will be made without my having to change all my connection strings each time for each client?


You will find a *VB6* implementation here:

<http://www.mvps.org/vbnet/index.html?code/network/netserverenumver.htm>

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>

Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.