Database Connection String Info

前端 未结 6 1223
误落风尘
误落风尘 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 11:24

    After you initialize the connection with the connection string, you can get those information from properties of the initialized connection object.

    Check System.Data.Common.DbConnection.

提交回复
热议问题