Is there any connection string parser in C#?

后端 未结 9 895
遥遥无期
遥遥无期 2020-11-28 05:09

I have a connection string and I want to be able to peek out for example \"Data Source\". Is there a parser, or do I have to search the string?

9条回答
  •  南方客
    南方客 (楼主)
    2020-11-28 05:56

    You want to use DbProviderFactory.CreateConnectionStringBuilder () which provides you a connection string builder/parser specific to your connector, but does not require you to use any connector specific classes.

提交回复
热议问题