Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cursor fields being truncated at runtime
Message
De
19/01/1999 19:49:04
 
 
À
19/01/1999 16:16:53
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:
00177843
Vues:
27
>>
>>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?

Just an interesting tidbit here- when you open a view with the NODATA clause, internally, VFP uses an SQL statement like the following to return an empty cursor:

SELECT * FROM MyTable WHERE 1=0

I learned this on accident when a my error handler trapped the incorrect executing line of code, and this showed up.
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform