Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sort date()
Message
De
03/06/2013 07:51:59
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01575417
Message ID:
01575479
Vues:
56
If you give the commands just like the example I give you, obviously adapting file names and field names, that will create a so-called "cursor" - a temporary table. Visual FoxPro will save it on disk with some random name, but delete the file as soon as you close the cursor. Many different Visual FoxPro commands work with cursors just as well as with tables. In this particular case (preparing data for reports) they have the following advantages: (1) cleanup is simpler. (2) great for multiuser access; if two users use the same commands, different temporary files on disk will be created, and there will be no conflict. Of course, you could also create a random filename yourself, but that takes more work.

>thanks Hilmar. I took your information down and will one day learn how to set up a cursor.
>
>k
>
>>>how would I display all records before a specific date.
>>>I have a field called kdate which displays when a record was created
>>>I need to call all records before April 2013.
>>>
>>>thanks
>>>k
>>
>>It really depends where you want to show it. Tore's reply is appropriate for an editing form. For a report, I would SELECT all data into a cursor, something like this:
>>
>>
>>local ldDate
>>ldDate = ThisForm.LblDate.Value && I am assuming the user will type the limiting date into a form
>>SELECT * FROM MyTable WHERE kDate < ldDate ORDER BY kDate INTO CURSOR Temp
>>REPORT FORM MyReport
>>
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform