Re: Novell Server - Records Crossover
Manny, the autoincrement field rule looks to the record in your table that has the highest order number and then increments it. In a multi-user setting, if two workstatioins begin a new order at about the same time, the field rule on each machine will find the SAME highes field value, since no new records have been saved to your table. Question 1 for you: Do you have questions about this?
Next, Alpha displays the incremented order number on your form. Until that record is commited to the table it's only a provisional order number. If the other workstation saves their record to the table first, then this work station's field value will be checked against the table when its order is commited. If it's no longer highest, it will be incremented again. Question 2 for you: Do you have questions about this?
Next, the display of detail records from your linked one to many child table is "crossing over" because the two workstations have, at least temporarily, the same auto-incremented order number. The overlap goes away when the second workstation saves their record, because the just saved record now has a different order number. Handled transparently for you by the field rule. Question 3 for you: Do you have questions about this?
Suggestions to prevent the display of child table records entered on other workstations in a multi-user setting:
a) Force each new order to be immediately saved. This commits the record to the table so the next workstation's field rule will compute a DIFFERENT order number. Use this approach if you must use the autoincrment field rule.
b) An alternative that will work if you must use the autoincrmenet field rule is to suppress the display of the linked child table records on your form until you've saved the order header. If you do it this way you don't need to force the newly begun header record to be saved first.
c) An alternative that many prefer is to NOT use the autoincrmenet field rule, but to roll your own incrementing script that fires when the parent table record is saved. Sample code has already been posted here. This typically involves retrieving the last order number from a table OTHER than your order header table, and then immediately commiting a newly incremented field value to that table. This works well if it's done when the order header record is saved, and before you try to begin entering linked child table records.
Last question: Do you have questions about these ideas?
Manny, the autoincrement field rule looks to the record in your table that has the highest order number and then increments it. In a multi-user setting, if two workstatioins begin a new order at about the same time, the field rule on each machine will find the SAME highes field value, since no new records have been saved to your table. Question 1 for you: Do you have questions about this?
Next, Alpha displays the incremented order number on your form. Until that record is commited to the table it's only a provisional order number. If the other workstation saves their record to the table first, then this work station's field value will be checked against the table when its order is commited. If it's no longer highest, it will be incremented again. Question 2 for you: Do you have questions about this?
Next, the display of detail records from your linked one to many child table is "crossing over" because the two workstations have, at least temporarily, the same auto-incremented order number. The overlap goes away when the second workstation saves their record, because the just saved record now has a different order number. Handled transparently for you by the field rule. Question 3 for you: Do you have questions about this?
Suggestions to prevent the display of child table records entered on other workstations in a multi-user setting:
a) Force each new order to be immediately saved. This commits the record to the table so the next workstation's field rule will compute a DIFFERENT order number. Use this approach if you must use the autoincrment field rule.
b) An alternative that will work if you must use the autoincrmenet field rule is to suppress the display of the linked child table records on your form until you've saved the order header. If you do it this way you don't need to force the newly begun header record to be saved first.
c) An alternative that many prefer is to NOT use the autoincrmenet field rule, but to roll your own incrementing script that fires when the parent table record is saved. Sample code has already been posted here. This typically involves retrieving the last order number from a table OTHER than your order header table, and then immediately commiting a newly incremented field value to that table. This works well if it's done when the order header record is saved, and before you try to begin entering linked child table records.
Last question: Do you have questions about these ideas?
Comment