Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
If you think this is good, you're a really crappy coder
Message
From
07/06/2021 16:37:34
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
If you think this is good, you're a really crappy coder
Miscellaneous
Thread ID:
01681065
Message ID:
01681065
Views:
49
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.
Reply
Map
View

Click here to load this message in the networking platform