Jan,
>I consider to use this code in client-server model (with ADO access) and I don't want to transfer all result records over LAN. I want use as backend different platform (from VFP dbf to SQL Server). I want to create select, which on backend side return all records, which I'll transfer to client.
SQL Server's TOP 10 will give you just 10 unless you specify WITH TIES, which will then act like VFP's TOP 10 and list the top 10 plus any entries with an identical value to #10.
So you can use the same SELECT TOP 10 statement for both versions, and just do additional processing to get rid of the extra rows in VFP. This is a good example where a "data services" object could be called by your application, but act differently inside the object's methods, depending on the backend selected.