Counter

Results 1 to 2 of 2

Thread: Counter

  1. #1
    Join Date
    Dec 1969
    Posts
    308

    Default Counter

    I have a 1 to many relationship in my two tables. 1 project with many tasks. What is the best way to set the task number to auto count so that each time they enter a new task, it numbers the task with the next possible number. EX: project one has task(1,2,3) and project 2 has task(1,2,3,4,5). I need to automatically generate task #4 for Proj #1 and then turn around and generate task #1 for Proj #3. Thanks.

  2. #2
    Join Date
    Dec 1969
    Posts
    24

    Default RE: Counter

    I would use two fields: one for the autonumber and hence the uniqueness and another for the sequence of the task. You can always get the max(iseqNum) from the db and then increment by one to ensure that you are going in the right order.

Posting Permissions

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