The error -2147217900: Malformed GUID in query expression when using ODBC Scalar Functions via the Microsoft.ACE.OLEDB.12.0 provider may stem from the way the ACE provider interprets the syntax for scalar functions. While Microsoft Access SQL supports the use of ODBC defined syntax for scalar functions, compatibility issues can arise when using the ACE OLEDB provider, particularly with certain functions or when the syntax is not fully supported.
In your case, the expression {fn CONVERT(ID, SQL_INTEGER)} might not be correctly interpreted by the ACE provider, leading to the GUID error. It is important to ensure that the syntax used is compatible with the OLEDB provider. You might consider alternative approaches, such as using standard Access SQL functions or ensuring that the data types in your expressions are explicitly defined in a way that the ACE provider can process correctly.
If the issue persists, checking for updates or patches for the ACE provider might also help, as improvements and bug fixes are regularly released that could address such compatibility issues.
References: