sbornstein2
asked on
ASP.Net Get Datasource name only from entity connection string?
Hello all,
I have the following as an example:
<add name="CustomerEntities" connectionString="metadata =res://*/C ustomer.cs dl|res://* /Customer. ssdl|res:/ /*/Custome r.msl;prov ider=Syste m.Data.Sql Client;pro vider connection string="data source=DB111-SERVER;initia l catalog=Customer;integrate d security=True;multipleacti veresultse ts=True;ap plication name=EntityFramework" " providerName="System.Data. EntityClie nt" />
I need to get the server name only into a string variable so "DB111-SERVER". I tried using the SQL SqlConnectionStringBuilder but it throws an error on metadata doesn't understand it.
I have the following as an example:
<add name="CustomerEntities" connectionString="metadata
I need to get the server name only into a string variable so "DB111-SERVER". I tried using the SQL SqlConnectionStringBuilder
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
tx
ASKER