Alistair Leslie-Hughes (@alesliehughes) commented about dlls/odbc32/proxyodbc.c:
return SQL_SUCCESS;
}
+static SQLRETURN set_con_attr( struct handle *handle, SQLINTEGER attr, SQLPOINTER value, SQLINTEGER len ) +{
- SQLRETURN ret = SQL_ERROR;
- if (handle->unix_handle)
- {
struct SQLSetConnectAttr_params params = { handle->unix_handle, attr, value, len };
ret = ODBC_CALL( SQLSetConnectAttr, ¶ms );
- }
- else if (handle->win32_handle)
- {
ret = handle->win32_funcs->SQLSetConnectAttr( handle->win32_handle, attr, value, len );
You cannot assume for a native window driver that this function will exist. For example, the MySQL ODBC driver has two DLL's (ASCII and Unicode), so in this case only the ascii version will work. Suggestion. ``` - ret = handle->win32_funcs->SQLSetConnectAttr( handle->win32_handle, attr, value, len ); + if (handle->win32_funcs->SQLSetConnectAttr) + ret = handle->win32_funcs->SQLSetConnectAttr( handle->win32_handle, attr, value, len ); + else if (handle->win32_funcs->SQLSetConnectAttrW) + ret = handle->win32_funcs->SQLSetConnectAttrW( handle->win32_handle, attr, value, len ); ```