Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Flush
Message
De
09/11/2007 05:59:04
 
 
À
09/11/2007 02:52:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Re: Flush
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01267840
Message ID:
01267886
Vues:
16
>On Save Button, I use FLUSH FORCE command as
>
>select avlbook
>seek thisform.text1.value
>if !found()
>	append blank
>	replace date with thisform.text14.value
>	replace gate_no with thisform.text1.value
>endif
>
>select avlbook
>go top
>append blank
>delete
>pack
>flush force
>
>
>Is it true way or I should change codes

This code is wrong. You do not need to append a blank record and then delete that. Just use the following:
select avlbook

if !seek( thisform.text1.value )

	append blank
	replace ;
          date    with thisform.text14.value, ;
	  gate_no with thisform.text1.value

endif

pack   && this is not a good idea

use    &&  close the table

flush force   
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform