No. can`t increment automatically when import data by XMLPORT

undy0602undy0602 Member Posts: 67
edited 2015-12-16 in NAV Three Tier
Hello all,
My table has one Primary key field that is integer and autoincrement. But it can not increment automatically when I import data by XMLPORT. It appears below error message:
The TestTable already exists. Identification fields and values: No.='0'

Please advise me
Regards,
Undy

Answers

  • EvREvR Member Posts: 178
    When inserting, you have to assign a value to the identity field. So OnBeforeInsertRecord, just set the value of the PK to '0'. Sounds strange but you have to assign a value.
    SQL server will then assign the next available integer.
Sign In or Register to comment.