Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Vfp50 - Using BLANK records as new records?
Message
De
23/05/1997 13:37:12
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00032970
Message ID:
00033446
Vues:
38
>>I want to use up all the BLANK records that were made with a APPEND BLANK but never used. I do not want to PACK. What do I search for when looking for BLANK records?
>>
>>SCAN FOR empty(myfield)
>>IF FOUND()
>> GOTO RECNO()
>> THISFORM.REFRESH()
>>ENDIF
>>ENDSCAN
>
>2 points
>
>1st if you want to do this why not
>
>delete for empty(myfield)
>pack
>
>and 2nd why are you using append blank. This is a bad strategy as it is slower, requires a temporary lock of the table header which can lead to problems in a big multiuser environment and you end up with blank records when there is an error.
>
>What I do is store all data for new records in the controls. When the user commits to adding the record use the
>
>insert into mytable (field1,field2 etc) values (thisform.control1.value, etc)
>
>Insert into doesn't lock the table header, is faster than append and you don't end up with blank records.
>
>HTH

thanks Todd for the information... I will look into INSERT INTO..
I can not PACK... when the user DELETES, I will use that EMPTY record
the next time a user wants to add. This way I do not have to code SAVE/REVERT.
(One less click for the user)--I only do this thing for small tables, otherwise, I would use TABLE BUFFERING.
thanks again...rob
Robert Keith
Independent Developer
San Antonio, Texas
E-mail address:
rebelrob1@yahoo.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform