Hi there, I have been receiving error 3197 lately "stopping the db engine because another user attempts to change the same data".
There being only one user, the reason must be bad programming.
Here is the situation:
I have a main form and subform which displays the Purchase Order Header (main form) and Purchase Order Lines (Subform) (see attachment)
One command button causes all prices on my puchase lines to be updated.
Another button does a whole bunch of transformations on the Order Header and lines. For example, when I book receipts on a Purchase order:
- I create a new Header record with another order number, in fact another prefix followed by a number (say RE(ceipt)9999 instead of PO9999) (the key to all my files are autonumbers)
- I create new Order Lines with the corresponding references to the Header
- I then update the old Header record and set a PurchOpen field to closed. It is here that my program crashed, even though this code to set the the PurchOpen field on the old record has been there for ages. So the change must be caused by recent changes to the code I made, and I cannot figure out where to look. I had just updated all the line prices (Update Prices command)
I can only see two possible reasons:
1. I somehow update the same record in the same procedure and sin against an unknown rule here
2. I Changed data with one procedure on the form, and then the same data with another procedure on the same form.
Any ideas where to start looking?
There being only one user, the reason must be bad programming.
Here is the situation:
I have a main form and subform which displays the Purchase Order Header (main form) and Purchase Order Lines (Subform) (see attachment)
One command button causes all prices on my puchase lines to be updated.
Another button does a whole bunch of transformations on the Order Header and lines. For example, when I book receipts on a Purchase order:
- I create a new Header record with another order number, in fact another prefix followed by a number (say RE(ceipt)9999 instead of PO9999) (the key to all my files are autonumbers)
- I create new Order Lines with the corresponding references to the Header
- I then update the old Header record and set a PurchOpen field to closed. It is here that my program crashed, even though this code to set the the PurchOpen field on the old record has been there for ages. So the change must be caused by recent changes to the code I made, and I cannot figure out where to look. I had just updated all the line prices (Update Prices command)
I can only see two possible reasons:
1. I somehow update the same record in the same procedure and sin against an unknown rule here
2. I Changed data with one procedure on the form, and then the same data with another procedure on the same form.
Any ideas where to start looking?