odbc - How can I request the database product name with ADO.NET? -


I develop a product with a custom database configuration. I use ADO.NET for this with System.Data.Odbc.OdbcConnection. To make some difference between the database, there is a simple solution to detect the current DBMS connection.

I think OdbcConnection.Driver property may be more appropriate in terms of OP, since ServerVersion Only version number should be returned

Driver properties will return the name of the DLL, such as "Sqlsrv32.dll" in the case of SQL Server then the OP can apply case based arguments.


Comments