Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Vfp50 - Using BLANK records as new records?
Message
De
22/05/1997 08:57:29
 
 
À
21/05/1997 23:19:56
Larry Long
ProgRes (Programming Resources)
Georgie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00032970
Message ID:
00033247
Vues:
44
>>>
>>>The "do while not eof()" is going to be a drag on performance. Why not just search for one record since you are only adding one record? Maybe some thing like this...
>>>
>>>*SAVE CURRENT "SET DELETE" STATE
>>>STORE SET("DELETE") TO DELE_STATE
>>>*TURN IT OFF
>>>SET DELE OFF
>>>
>>>
>>>*SAVE CURRENT INDEX ORDER
>>>STORE ORDER() TO M.ORDER_STATE
>>>*TURN IT OFF
>>>SET ORDER TO 0
>>>
>>>LOCA FOR DELETED() OR EMPTY(NAME)
>>>
>>>IF NOT FOUND()
>>> APPEND BLANK
>>>ELSE
>>> RECALL
>>>ENDIF
>>>
>>>THISFORM.GRID1.COLUMN1.SETFOCUS
>>>
>>>*RESTORE "SET DELETE" STATE
>>>SET DELE &DELE_STATE
>>>
>>>*RESTORE INDEX ORDER
>>>IF NOT EMPTY(M.ORDER_STATE)
>>> SET ORDER TO (M.ORDER_STATE)
>>>ENDIF
>>
>>In your code, when I do the recall, it does not use the deleted record
>>as the new record?
>>thanks...rob
>
>I thought you wanted to reuse the record if one was deleted or empty?

Hi Larry.. Yes I do want to resue the record if one was deleted or empty.
This way the user can only add one blank record (by append blank) to the table. Once a record is added, the next time the user wants to add, the program uses any blanks or deleted records. I think this is better that table buffering for this application because it will be one less key stroke (no SAVE/REVERT). If you do not think so, please tell me why. For quick adding of one field, in this case, I could do without table buffering. Table buffering has it's place. Don't get me wrong, I could not live without TABLE BUFFERING in most cases. thanks...rob

If I use table buffering, than there
will be another move the user has to make.
Robert Keith
Independent Developer
San Antonio, Texas
E-mail address:
rebelrob1@yahoo.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform