Basic class for querying stored procedures