Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cursor fields being truncated at runtime
Message
De
19/01/1999 21:00:22
 
 
À
19/01/1999 20:14:32
Mark Hall
Independent Developer & Voip Specialist
Keston, Kent, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00177621
Message ID:
00177864
Vues:
32
>>>
>>>Also, rather that using AFIELDS, you could
>>>SELECT * FROM tablename INTO CURSOR cursorname NOFILTER
>>>to get a copy of your original table for reporting.
>>
>>You raise an interesting point here Mark. That sure is a way to create a cursor based on an existing structure. The cursor will contain every record in the original dataset. I often want an empty cursor.
>>You could go
>>SELECT * FROM tablename WHERE .F. INTO CURSOR cursorname NOFILTER
>>however this is not Rushmore optimizable (try it on a huge dataset!)
>>So....
>>Does anyone know a fast one liner for creating an empty cursor based on an existing structure?
>
>Hi David,
>
>For an empty cursor, I think AFIELDS() etc. would definetly be the way to go.
>
>As for something optimizable.... well, it would have to be a WHERE clause based on an index,
>
>WHERE DELETED() = .f. AND DELETED = .t.
>
>maybe.

It seems from my testing today that WHERE .F. and WHERE 1=0 do in fact optimise. I'm getting average times of 0.002 seconds on a 1,500,000 record table over a network. I don't recall this being true in FPW2.6 days.

Regards
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform