how can I specify the number of records that have to be sent back dynamically in an Xml Template?
I am currently busy developing a client-server application that pulls data from an Sql Server via Xml. If the client application has a bad connection to the server, the program has to get the data in small portions.
When I use:
SELECT TOP @amount *
I get the error: syntax near '@amount'.
The query fails as wel when I tried to use:
SET ROWCOUNT @amount
SET ROWCOUNT 0
This works fine in Sql analyser, but sql doesn't allow the integers to be parameters and casting them to int does not work either.
It is possible to use dynamic sql, but that will be very insecure, cause everyone can intercept the sql statement and change it to whatever he wants. That is why I use xml templates, because the only thing a cracker can do with that is getting information that he is not supposed to see.