This is two problems so maybe I need to put it in two posts ... I have not been able to reproduce this - but then again - it is pretty difficult to run two copies of the database at the same time and push the buttons at exactly the same time ..
This is how the application works ..
1. The customer creates a quote by choosing existing data in the database. This is stored in a "Quote" table.
2. When the quote is accepted, they dispatch the quote to a driver and the quote is copied to a "Load" table with additional information about the load (ie. driver, scheduled date, gallons, etc.)
3. When the driver delivers the load he brings back information about the load and they "Complete" the load (date delivered, actual gallons, etc.)
The first issue:
Two people were dispatching two different loads at the same time. One of them was correct. The 2nd load had the driver and gallons of the 1st load ..iow;
Person #1 entered "Joe" and "3000 gallons" on the xdialog form. Person #2 entered "Bob" and "2000 gallons" on the xdialog form.
Person #1 ended up with a record for Load #A-101 with a driver whose name was Joe who delivered 3000 gallons.
Person #2 ended up with a record for Load #A-102 with a driver whose name was Joe who delivered 3000 gallons.
The 2nd issue:
Today they tell me they tried it again and it created two records with the same load number.
I am using an auto-increment value for the load number which is assigned when a new record is created - and an XDialog form to capture information from the user.
Because the load number is an auto-increment value, I can't make it unique (I actually thought that an auto-increment value is SUPPOSED to be unique!)
Attached is the dispatch code. What do I have wrong here?
This is how the application works ..
1. The customer creates a quote by choosing existing data in the database. This is stored in a "Quote" table.
2. When the quote is accepted, they dispatch the quote to a driver and the quote is copied to a "Load" table with additional information about the load (ie. driver, scheduled date, gallons, etc.)
3. When the driver delivers the load he brings back information about the load and they "Complete" the load (date delivered, actual gallons, etc.)
The first issue:
Two people were dispatching two different loads at the same time. One of them was correct. The 2nd load had the driver and gallons of the 1st load ..iow;
Person #1 entered "Joe" and "3000 gallons" on the xdialog form. Person #2 entered "Bob" and "2000 gallons" on the xdialog form.
Person #1 ended up with a record for Load #A-101 with a driver whose name was Joe who delivered 3000 gallons.
Person #2 ended up with a record for Load #A-102 with a driver whose name was Joe who delivered 3000 gallons.
The 2nd issue:
Today they tell me they tried it again and it created two records with the same load number.
I am using an auto-increment value for the load number which is assigned when a new record is created - and an XDialog form to capture information from the user.
Because the load number is an auto-increment value, I can't make it unique (I actually thought that an auto-increment value is SUPPOSED to be unique!)
Attached is the dispatch code. What do I have wrong here?
Comment