Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Non data bearing primary keys
Message
 
À
13/06/1998 17:11:11
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00106667
Message ID:
00108757
Vues:
35
>No, it's just what was proposed here already. Instead of "&& This Was", you could just put this:
> Replace All PK with Gimme_Pk() for empty(PK)
>where gimme_pk is a function which delivers the new value of the PK. Case closed.
>If you're sure you have to do this for new records only (you seem to be adding records from more *.fla files), you could fill the PKs only once, when you exit this loop, or
>
> _rcn=recc()+1
> APPEND FROM (m.FileName)TYPE DELI
> if _tally>0
> go _rcn
> REPLACE REST ref_num WITH m.ref_num FOR EMPTY(ref_num)
> go _rcn
> Replace REST PK with Gimme_Pk() for empty(PK)
> endif
>
>This isn't greatly different, but might speed things up a little.

Nice Call Dragan! REPLACE REST... is something I never used before! But I don't see the REST clause in FPW2.6 syntax, which is the current platform for the code in question here. I'll have to look into this once everything else is in place to move this app over to the VFP world. Thanks!
Roxanne M. Seibert
Independent Consultant, VFP MCP

Code Monkey Like Fritos
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform