Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Consecutive
Message
From
05/06/2019 02:42:20
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01668921
Message ID:
01668923
Views:
62
Likes (1)
>My form uses a folio or consecutive ticket number which I keep in a control table, when the user decides to save his data the folio is increased by 1; then I replace it in the control table, everything goes well while the work is done in a single-user environment, the problem arises (at random) when the environment is multi-user, the folio is duplicated, not the remaining information, any suggestions?

Francisco,

A quick and easy way to implement what Al suggested is to set your ticket number field to Integer AUTOINC. VFP will do for you the job of taking care of simultaneous additions to the table.

If you need to have the ticket number before user saves the record and while he/she is editing it, you may have a separate table just to hold ticket numbers, and that's the one that is autoincremented as soon as a ticket number is required.
----------------------------------
António Tavares Lopes
Previous
Reply
Map
View

Click here to load this message in the networking platform