Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
If you think this is good, you're a really crappy coder
Message
De
07/06/2021 16:37:34
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
If you think this is good, you're a really crappy coder
Divers
Thread ID:
01681065
Message ID:
01681065
Vues:
50
Somewhere before this code, a scatter name appvars was done. The cursor apvars may or may not be active.

m.apvars.vchnum=apvars.vchnum+1
goApp.cTblName='apvars'
goApp.modify_record()

There are 15 last generated numbers in that table. One of them is incremented. A modify record saves all 15 from the time of the scatter. If anyone else attempts to update that 1 row table, they lose their generated number and re-generate that number later. We have had such duplicates in invoice numbers and check numbers etc. etc.

We don't have a minimum level of skill or engineering. It is simple data modeling to have separate rows for this table, with each variable having a name.
Répondre
Fil
Voir

Click here to load this message in the networking platform