I'm running into a strange situation where 1 of 7 companies using one of my generic applications is getting a "cannot resynch on index" error up to 20% of the time. The fact that others are not having problems indicates to me that the basic script is OK (besides, how many ways are there to modify a Lookupc() function?) but something is either going on with their network or there is some strange issue that starts with more network users or larger data files.
My main question is whether anyone has any 'comparative' experience with a "cannot resynch on index" error between version 7 and version 8. Is version 8 any less susceptible to this issue? The program is currently in version 7 and one of these days I'd like to upgrade it to v8 but, due to the complexity of the app (517 scripts/functions with 89,000 lines of code - a lot of verifying to be done), I'm in no rush unless I find a definite need.
If you have other suggestions, I'm listening. Just remember that the current script works fine for 6 out of 7 companies so the basics have been proven correct.
FACTS:
- This happens in the OnSave Record event when saving work orders. A lookupc() is being used to make sure the agent name matches the agent number because imported data and modified agent records can cause mis-matches. (No data is changed. Only a message is displayed if there is an issue.)
- Once it happens, the only way they can stop it is to close the app and restart it.
- When it happens, it happens only on one computer. Everyone else continues to run correctly. (This seems very strange to me but I have verified that there are no local indexes that could be causing the issue.)
- None of the other companies have experienced the problem. (I've specifically asked 3 of them.)
- None of the other companies have quite as much data in their overall application but the lookup is just on the Agents table which has about 11,000 records with a file size of 5.5 Meg. - not small but not huge either. (The next largest user has about 5,000 records - roughly half the size.)
- This company has more users - almost always 2 and up to 4. Most other companies have 1 to 2 users and occasionally 3.
- The error occurs in the following lookup:
anamef = lookupc( "F", anumb, "Agent_namf", A5.Get_Path() + "\agents.dbf", "Agent_Nof" )
- The "Agent_Nof" index was created by the system for autoincrementing the Agent_nof field but this is just a lookup and adding new agents is relatively rare. Some days no new agents would be added but they still get the "cannot resynch on index" error.
I'm planning to change to a different index - one that I will create - rather than using the one created by A5 automatically. It will be the same as the "Agent_nof" index but it won't be defined as "Unique Only". It will be interesting to see what affect this has. I should know the results by the middle of next week.
By the way, for those of you thinking "Normalization", the agent name is included in the main table in order to speed up data entry. They can quickly type the agent name but have no idea what the agent number is; however, I need the agent number for other reasons. Putting both fields in this table was done out of need - not because I simply forgot to use good table design. In the case of this particular application it has even proven useful for checking data accuracy because sometimes the name has been wrong and sometimes the number has been wrong. I wouldn't have been able to find these issues if only one of the fields was stored in the main table. (This is a really fun application.)
My main question is whether anyone has any 'comparative' experience with a "cannot resynch on index" error between version 7 and version 8. Is version 8 any less susceptible to this issue? The program is currently in version 7 and one of these days I'd like to upgrade it to v8 but, due to the complexity of the app (517 scripts/functions with 89,000 lines of code - a lot of verifying to be done), I'm in no rush unless I find a definite need.
If you have other suggestions, I'm listening. Just remember that the current script works fine for 6 out of 7 companies so the basics have been proven correct.
FACTS:
- This happens in the OnSave Record event when saving work orders. A lookupc() is being used to make sure the agent name matches the agent number because imported data and modified agent records can cause mis-matches. (No data is changed. Only a message is displayed if there is an issue.)
- Once it happens, the only way they can stop it is to close the app and restart it.
- When it happens, it happens only on one computer. Everyone else continues to run correctly. (This seems very strange to me but I have verified that there are no local indexes that could be causing the issue.)
- None of the other companies have experienced the problem. (I've specifically asked 3 of them.)
- None of the other companies have quite as much data in their overall application but the lookup is just on the Agents table which has about 11,000 records with a file size of 5.5 Meg. - not small but not huge either. (The next largest user has about 5,000 records - roughly half the size.)
- This company has more users - almost always 2 and up to 4. Most other companies have 1 to 2 users and occasionally 3.
- The error occurs in the following lookup:
anamef = lookupc( "F", anumb, "Agent_namf", A5.Get_Path() + "\agents.dbf", "Agent_Nof" )
- The "Agent_Nof" index was created by the system for autoincrementing the Agent_nof field but this is just a lookup and adding new agents is relatively rare. Some days no new agents would be added but they still get the "cannot resynch on index" error.
I'm planning to change to a different index - one that I will create - rather than using the one created by A5 automatically. It will be the same as the "Agent_nof" index but it won't be defined as "Unique Only". It will be interesting to see what affect this has. I should know the results by the middle of next week.
By the way, for those of you thinking "Normalization", the agent name is included in the main table in order to speed up data entry. They can quickly type the agent name but have no idea what the agent number is; however, I need the agent number for other reasons. Putting both fields in this table was done out of need - not because I simply forgot to use good table design. In the case of this particular application it has even proven useful for checking data accuracy because sometimes the name has been wrong and sometimes the number has been wrong. I wouldn't have been able to find these issues if only one of the fields was stored in the main table. (This is a really fun application.)
Comment