ok, this has no formatting as such, but the code works.
check the code, you will need to change the connection string.
all i have done for this example is created a query to choose the last 5 orders, by sorting the contents of the orders table in descending order of orderID and limiting the number of rows returned to 5.
i put the result fields in a table and added the repeat region server behavior to the table.
its not pretty, but should show you what you need to do.
good luck