How to extract database name from connection string irrespective of RDBMS?
I am working on the class which is not aware about the RDBMS being used. Of-course, rest of the application is well aware about it. Connection string is input to this class. I need database name. How can I extract database name from connection string irrespective of RDBMS? I read following question: How to get Database Name from Connection String using SqlConnectionStringBuilder Extract properties of sql connection string Following approaches are suggested there: Use Connection String Builder class: Most answers use connection string builder with specific RDBMS. So, I have to use either