ExecuteSQL and getting error details
ExecuteSQL ( "select * from MyTable"; " "; ¶ )
Now if there is no table with that name of an other SQL error, you get back a ? as result. Not helpful.
Now if you switch to FM.ExecuteSQL or FM.ExecuteFileSQL function in MBS Plugin, you can use FM.ExecuteSQL.LastErrorMessage to get error message.
So if you run
MBS( "FM.ExecuteSQL";"select * from Contacts" )
and also query error with:
MBS( "FM.ExecuteSQL.LastError" )
MBS( "FM.ExecuteSQL.LastErrorMessage" )
you may get error "8309" with error message "ERROR: FQL0002/(1:14): The table named "Contacts" does not exist.". This should be more useful to locate the error.