> Is it possible to detect which version of MySQL/MariaDB is used , and > according to the result select the right connection, at run-time ?
Trial and error: Loop over the connection component until you find one that doesn't raise exception when activated. Simple, but takes more resource. Querying the tool: Executes `mysql --version` and parse the result. Apparently the output is consistent enough between versions, it's always the fifth column. More complicated logic, but lower resource usage. Let the user decide: Provide a config file and let user fill it. Just connect anyway to whatever value supplied by user, certainly you can limit to certain accepted values only. This lifts the responsibility to user to supply the correct version. -- View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Multiple-versions-of-MySQL-MariaDB-tp4043756p4043757.html Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com. -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus