On Thu Jul 18 10:17:47 2024 +0000, Hans Leidekker wrote:
Right, the fallback may not exist. If the application uses v3 functions with a v2 driver it has to know which v3 functions are available. Anyway, I think the reverse case is the more interesting one, mapping v2 functions to v3. Most drivers support v3 these days but not all applications will have been ported to v3.
Old database applications still work on windows, which suggest fall backs are in play no matter which ODBC32 functions are used.
Applications don't need to know what functions are available at the driver level. That up to ODBC32 to work the best available function(s) for the given call. The only things the might vary are the options or datatypes available. (eg type SQL_C_TYPE_TIME isn't supported for v2).
For an application, It doesn't matter if ODBC32 uses SQLAllocEnv() or SQLAllocaHandle() under the hood as long a Environment Handle is returned (example).