get my Sql Serveur Name for SQL connection string.

  • Thread starter Thread starter Romain TAILLANDIER
  • Start date Start date
R

Romain TAILLANDIER

Hi group

My connection string is :
this.MyConnStr =
@"Server=MyComputerName\MyDbName;Database=master;Trusted_Connection=True;Poo
ling=False";

I need to get the Server name for build my Connection String at runtime.
Found nothing on google, where can i search for that ?


Please help :(
ROM
 
Hi,

I'm not sure but...

try the ip-number instead. However if you use the connectionstring on the
server simply write localhost
@"Server=(localhost)\MyDbName
or
@"Server=(123.456.78.90)\MyDbName

/anders
 
Back
Top