Use the MaxRowCount property to control the maximum number of rows that will be returned when executing an SQL SELECT statement. Setting this property to -1 will indicate that the number of rows returned is unlimited.
This property does not respect any DISTINCT, GROUP BY, or ORDER BY claues in the SQL statement. It is primarily useful for making sure that end users do not accidentally construct SQL queries that generate cartesian products or other types of queries that can cause the number of rows to be returned to be enormous.