Im no expert on SQL but i read that you could put RETURN @@Rowcount at the end of the query so like 'SELECT * FROM ve_forms ORDER BY title ASC RETURN @@Rowcount