Medisoft Error 7059

You may run into the error 7059 at various places throughout the Medisoft program.  This error will occur if you try to re-index a table that does not have unique values in its key fields.

Tools Needed:
Advantage Data Architect (ARC32)

WARNING: Follow these steps at your own risk.  If not done properly could cause serious data corruption or complete loss of data!

Process for Correcting:


Prior to attempting to correct this error, you must install the Advantage Data Architect (ARC32) program.


1. Restore the file 7059.mbk from the disk that was distributed to you.
2. Once you have restored the file, rebuild the indexes for the practice. You will get the error 7059.
3. In order to identify which file contains the bad data, you will need to rebuild the indexes for individual files, until the error repeats itself. In this instance, the error will occur on the Transaction file.
4. Open an Explorer window, and browse to the data directory for this practice.
5. Follow the steps outlined in Appendix B for freeing a data dictionary bound table.
6. Double click on the mwtrn.adt file.
7. You will be asked to enter the User Name and Password. Enter user and password. Click OK.
8. You should now see the transaction table opened using the ARC32 program. 9. You will need to find the Unique Key field which should not be duplicated. In the transaction table, it is the Entry Number. Unique Key Codes were previously listed in the Data portion of this manual.
10. Next, find the record that has the largest value entered into the Entry Number field. You will need to note this for use in step 15.
11. You will now need to find duplicate entries in the Entry Number column. Usually, the problem records will be located at the bottom of the table. For this reason, best practice would state that you start at the bottom of the table and scroll up. In this example, we have two records with the number 16 in the Entry Number field.
12. You will not be able to change the value until you change the field from an autoinc to an integer field. Click the Table menu and Properties to open the Table Designer.
13. Highlight the Entry Number field.
14. Set the Data Type field to integer. Once changed, click OK.
15. You will now be able to modify the entry number. Once you have found the duplicate entries, you will need to change one of them to a unique value. This is why you noted the highest entry number currently in use. In one of the duplicate fields, enter a number approximately 100 higher than your highest entry number.
16. Once you have entered the new Entry Number, hit the down arrow button on your keyboard. This should move the cursor to the record below the one you modified. This process will save your changes.
17. Click the Table menu and Properties to open the Table Designer.
18. The Entry Number field needs to be set back to the Data Type of autoinc. Click OK. The next record entered would now automatically increment to one digit higher than the one we created.
19. You will now be able to rebuild your index files, and the error 7059 will be corrected.