Database Connection String Info

前端 未结 6 1251
误落风尘
误落风尘 2020-12-31 10:55

In .Net is there a class in .Net where you can get the DB name, and all the connection string info without acutally doing a substring on the connection string?

EDIT:

6条回答
  •  感情败类
    2020-12-31 10:59

    if you build your connection string using the Connection string builder (e.g. OracleConnectionStringBuilde, and it will be different for different database), in that case easily retrieve the information out of it.

    here it explained:

    http://msdn.microsoft.com/en-us/library/ms254947.aspx

提交回复
热议问题