After executeNonQuery[Sync] call SQLFreeStmt(..., SQL_CLOSE)

Hopefully this will avoid any invalid cursor state messages