Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select, which returns exact number of records
Message
From
14/04/2000 13:42:52
 
 
To
14/04/2000 05:36:31
Jan Korecko
Coopex Soft S.R.O.
Presov, Slovakia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00359207
Message ID:
00359835
Views:
9
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.
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Previous
Reply
Map
View

Click here to load this message in the networking platform