Does anyone know of a good way, programmatically, to determine if a sql server is a mysql or mssql installation?
I've got an app in c# that has to be able to connect to either mysql or mssql. I can connect to either if I know which it is, but I can't tell from the connection settings because all I get are the server name, userid, password, and database name.
I can have the settings file store the type of server, but this opens up an avenue for user error that I'd like to avoid.
select version(). that'll work on mysql, and give you a version number. mssql equivalentselect @@version. neither should work on the opposite system.