This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Error: attempt to store dublicate values in unique index

Former Member
Former Member
Hello,

I wanted to connect M-Files with my accounting system (based on Firebird database) in order to import / add purchase invoices. I have created Object Type - purchase invoice and connected it to the external database.

When I try to add new purchase invoice in M-Files, I get the following info:

MPropertyPage2.cpp, 102, Creating a new object failed. (0x80040419)
MPropertySheet2.cpp, 143, Creating a new object failed. (0x80040419)
PropertySheetObject.cpp, 3253, Creating a new object failed. (0x80040419)
PropertySheetObject.cpp, 3253, Adding to the external database failed. (0x800400D2)
PropertySheetObject.cpp, 3560, Adding to the external database failed. (0x800400D2)
CoVaultMountingDocumentOperations.cpp, 214, Adding to the external database failed. (0x800400D2)
CoVaultMountingDocumentOperations.cpp, 324, Adding to the external database failed. (0x800400D2)
DocumentCache.cpp, 4705, Adding to the external database failed. (0x800400D2)
DocumentCache.cpp, 4772, Adding to the external database failed. (0x800400D2)
DocumentCache.cpp, 4915, Adding to the external database failed. (0x800400D2)
RPCDocumentOperations.cpp, 117, Adding to the external database failed. (0x800400D2)
RPCDocumentOperationsHelper.cpp, 1696, Adding to the external database failed. (0x800400D2)
RPCDocumentOperationsHelper.cpp, 1874, Adding to the external database failed. (0x800400D2)
RPCDocumentOperationsHelper.cpp, 21816, Adding to the external database failed. (0x800400D2)
RPCDocumentOperationsHelper.cpp, 8065, Adding to the external database failed. (0x800400D2)
RPCDocumentOperationsHelper.cpp, 8146, Adding to the external database failed. (0x800400D2)
RefreshExternalObjects.cpp, 1318, Adding to the external database failed. (0x800400D2)
RefreshExternalObjects.cpp, 1318, Unspecified error. (Execute SQL statement failed.
attempt to store duplicate value (visible to active transactions) in unique index "IX_DOC_OT_EXTIDSTATUS_EXTID" (ERROR: 335544349, SQLSTATE: 23000)) (0x80004005)
RefreshExternalObjects.cpp, 2836, Unspecified error. (Execute SQL statement failed.
attempt to store duplicate value (visible to active transactions) in unique index "IX_DOC_OT_EXTIDSTATUS_EXTID" (ERROR: 335544349, SQLSTATE: 23000)) (0x80004005)
RefreshExternalObjects.cpp, 1479, Unspecified error. (Execute SQL statement failed.
attempt to store duplicate value (visible to active transactions) in unique index "IX_DOC_OT_EXTIDSTATUS_EXTID" (ERROR: 335544349, SQLSTATE: 23000)) (0x80004005)
SQLHelper.cpp, 2915, Unspecified error. (Execute SQL statement failed.
attempt to store duplicate value (visible to active transactions) in unique index "IX_DOC_OT_EXTIDSTATUS_EXTID" (ERROR: 335544349, SQLSTATE: 23000)) (0x80004005)
SQLHelper.cpp, 4647, Unspecified error. (Execute SQL statement failed.
attempt to store duplicate value (visible to active transactions) in unique index "IX_DOC_OT_EXTIDSTATUS_EXTID" (ERROR: 335544349, SQLSTATE: 23000)) (0x80004005)
SQLHelper.cpp, 2914, Unspecified error. (Execute SQL statement failed.
attempt to store duplicate value (visible to active transactions) in unique index "IX_DOC_OT_EXTIDSTATUS_EXTID" (ERROR: 335544349, SQLSTATE: 23000)) (0x80004005)
(M-Files 9.0.3372.6)

Any ideas what went wrong and how to solve it?

I have also connected "Deliverers" to the same accounting system and it works fine.

Karolina
Parents
  • Hi Karolina,
    I hope, you have resolved this long time ago. But for anyone else running into the same issue:
    I ran into this error in a case, where for certain reasons (the datatype was not compatible) I could not specify the true external objectID to synchronize with the internal M-files objectID. I tried to get around it by putting the M-files objectID into an unused text field in the external database and visa versa, but it did not work. Creating a new object type in M-files with the correct datatype in objectID and setting the systems to synchronize the true objectID fields solved the problem. Of course this created a new issue with internal relations to records in the old M-files object, but that is a different story.
    In the same case there were some confusion due to the fact that the external database had several indexed fields and would not allow duplicate or empty entries into those fields, but the problem remained even after we fixed those issues.
    So it appears that IX_DOC_OT_EXTIDSTATUS_EXTID indicates a problem with synchronization between the objectID fields in M-files and the external database.
    And just for the record - you cannot change the datatype in the M-files objectID field, but this field had previously been synchronized with another external database, which had filled M-files with hexadecimal objectIDs. The new external database required integers for objectID and would not accept the existing values from M-files.
Reply
  • Hi Karolina,
    I hope, you have resolved this long time ago. But for anyone else running into the same issue:
    I ran into this error in a case, where for certain reasons (the datatype was not compatible) I could not specify the true external objectID to synchronize with the internal M-files objectID. I tried to get around it by putting the M-files objectID into an unused text field in the external database and visa versa, but it did not work. Creating a new object type in M-files with the correct datatype in objectID and setting the systems to synchronize the true objectID fields solved the problem. Of course this created a new issue with internal relations to records in the old M-files object, but that is a different story.
    In the same case there were some confusion due to the fact that the external database had several indexed fields and would not allow duplicate or empty entries into those fields, but the problem remained even after we fixed those issues.
    So it appears that IX_DOC_OT_EXTIDSTATUS_EXTID indicates a problem with synchronization between the objectID fields in M-files and the external database.
    And just for the record - you cannot change the datatype in the M-files objectID field, but this field had previously been synchronized with another external database, which had filled M-files with hexadecimal objectIDs. The new external database required integers for objectID and would not accept the existing values from M-files.
Children
No Data