Another Cross-DB compability fix; result set was -1 on MS SQL server - probably query did not work