Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unique Record
Message
From
07/08/2006 10:39:59
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
07/08/2006 01:00:40
Ed Hizon
Skswood Sdn. Bhd
Kuala Belait, Brunei
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01143354
Message ID:
01143463
Views:
7
>Dear All,
>
>I have made a program with a multiple station input say an ‘order’ which will have a unique order number automatically produced by the program once any user choose ‘new’ order. My problem is how could I be able to control this as any user may also opt to cancel or not to continue to process the order input. I want to avoid any order number which were not completed in the table or any order number skipped.
>
>Your advise would be greatly appreciated.
>
>Thanks.
>
>Ed

  • Assign the number as soon as the record is saved.
  • Use a transaction, in case something fails. The table that contains your sequence must be part of the transaction.
  • Explain the users why they don't see the numbers as soon as they create the order:

    "Assuming the number is assigned when you start creating an order, we would have the following problem: This system is used by several users, who could use more sequence numbers, after the one assigned to you. If you then cancel the editing, or some other error occurs, we would have 'holes' in the sequence. To avoid having 'holes' in the sequence, the only feasible solution we [the programmers] see is to assign the number only when the order is saved."


    HTH,

    Hilmar.
    Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
  • Previous
    Reply
    Map
    View

    Click here to load this message in the networking platform