Execute SQL and field names starting with _ (underscore)
I spent a lot of time understanding why a simple ExecuteSQL did not work.
At the end the reason was quite simple: it does not like field that start with _ (underscore)
Solving this issue is quite simple: just escape with “ (quote):
WHERE \”_kp_keyfield\” = ? "; “” ; “”; filed_or_value_to_compare)
Hope you do not spend time like me
It's not a bad idea to enclose all table occurrence and field names in quotes like this. Other common field names such as "date" can cause your SQL expression to fail due to corresponding with a reserved word in the SQL lexicon.