I recently had an issue with running server Stored Procedures via ODBC inside a TCL proc and found a solution, but not sure I understand the issue as I
It’s helpful to call SQLGetDiagRec after each error to get the reason for the failure. Your assumption about a byte limit may be incorrect. If you get the error messages then you don’t have to make any assumptions.