Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ADD ClickEvent
Message
De
09/01/2001 10:03:10
Chuck Tripi
University of Wisconsin - Milwaukee
Milwaukee, Wisconsin, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00460775
Message ID:
00461129
Vues:
12
That's why I am asking, is SCATTER doing nothing here?
>I'm not sure what the 'SCATTER' is doing. You might check the "Blank" command to blank all fields in the recalled record.

I thought that even with SET DELETED ON would still allow LOCATE FOR DELELTED() to locate a deleted record?
>Don't forget that if Set Deleted is ON that you will never find a deleted record - something I've forgotten on occasion.

There are no index for the deleted, just using the Primary key on the ID field. Yeah, I have been getting errors since this coding sometimes cause dupe records for some reason.
>I'm assuming that you either have a very small file or an index on deleted() since you're using 'LOCATE'.


I am using =TableUpdate(.T.) (in the Save button) and =TableRevert(.T.) (in the Revert button), so is that RECORD OPTIMISTIC buffering?
>You don't mention if you're using buffering at all. If you are not, then you are running a serious risk of having 2 records with blank ID fields because 2 users have clicked the ADD button at the same time. Buffering is a GOOD THING and (IMHO) should always be used.

So, how does this code look? Is it too simple or need more revision? Again, thanks for the reply.

>>* Authform ADD ClickEvent (Parent)
>>
>>SELECT person
>>LOCATE FOR DELETED()
>>IF NOT EOF()
>> REPLACE id WITH ''
>> RECALL
>> SCATTER
>>ELSE
>> APPEND BLANK IN person
>>ENDIF
>>
>>Is this the correct way to do this? Or there is something missing or should not be there (SCATTER?)? BTW, the ID of the person table is primary key (can not be duped). Thanks for looking at this code and correcting it (if any).
>>
>>Chuck
Today is tomorrow's yesterday.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform