Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Alternating Colors in Grids
Message
De
24/02/2006 12:18:19
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8
Divers
Thread ID:
01098730
Message ID:
01098964
Vues:
17
Do you need all columns? The index will not affect ordering the data at all. Change the methodology to this:

1. User enters a phone number to search for
2. Query the data using the phone number entered
SELECT field1, field2, field3 FROM TheTable WHERE PhoneNo = m.PhoneNo
3. Display the returned data as needed:
If one record is returned, display in form to edit
If more than one record, display the results in a grid
If no records, display appropriate message

This is the way client/server applications work. I've converted apps from the typical Fox way (give the users all the records) to the C/S methodology and customers prefer it once they get used to it.

>Craig:
> Thanks. When I said "obscure way", I meant a function that I had never heard of which either 1) return grid row numbers for non-active rows (the way that ActiveRow and RelativeRow return the row number for active rows), or 2) return the record's position when indexed (the way that RECNO() does for the table's natural order).
> I just ran a SQL SELECT on the table, using a dummy with the same structure and 300,000 records. I had the index set to TAG PhoneNumber, and did a simple "SELECT * FROM TableName ORDER BY PhoneNumber". It took nearly 6 minutes. SET TALK was OFF, and nothing big was running in the background. I need to be able to update the grid nearly instantaneously. Can it be optimized better?
>
>Jerry
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform