Pagination / TotalRowCount Incorrect on Adv SQL Query for Stored Proc

OutSystems 10

I have a need to call a stored procedure with an Adv SQL widget to pull data, but since the Adv SQL Query doesn't start with SELECT (I am using EXEC dbo.StoredProcName @parametersHere), I can't use the .Count property, and the pagination and total row count doesn't work properly.  I've tried the .List.Length and the .Length properties on the record lists, the table, the list bound to the table, even done AppendAll to another record list of the same type and tried to use that, but I still always get "1 - 50 of 51", then if I go to page 2, "51-100 of 101", etc.

The number of pages works correctly, and the line count per page is right, but I can't see how many rows are returned in total (TotalRowCount) with this stored proc.

What am I missing?

Rank: #4408

Hi Chris

Although this does not solve your immediate problem I would look at wrapping such a call using an API or service call to an extension using Integration Studio rather than to try and use Advanced SQL widget. The extension would wrap the stored proc and return a proper record list for you.


Rank: #258

Does the stored procedure return all rows at once? Or are you calling it each time (on a page change) with a rowindex?

Are you sure there is no "Max. Records" set on the advanced query?