added fall-back call to pure SQL if prepared statement fails.