Results 1 to 2 of 2

Thread: A predefined sequence of numbers

  1. #1

    Thread Starter
    Lively Member PatOls's Avatar
    Join Date
    Oct 2000
    Posts
    99

    Arrow

    HI,

    How do you predefine a sequence of numbers, for ex.

    User 1 places an order and gets ordernumber 15
    on his order

    another user places an order and get ordernumber 16
    on his order

    yet another user places an order and get ordernumber 17
    on his order

    anyone have any ideas?

    //Patrick

  2. #2
    Addicted Member LAURENS's Avatar
    Join Date
    Jan 2000
    Location
    Utrecht, the Netherlands
    Posts
    138
    Assuming you want to store those orders you could consider a SelfIncrementing field in your database. On every Add it will generate a new number. A disadvantage is that on a cancel of the add it will skip the generated number in the next record.

    Like
    Add -> 17
    Cancel
    Add -> 19
    Regards,
    Laurens

    Using VB5 Enterprise edition SP3
    VB6 Enterprise edition SP5

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width