Menu

Problem with adding new row

Hien Khieu
2006-11-29
2013-03-22
  • Hien Khieu

    Hien Khieu - 2006-11-29

    Hi everyone,

    I am having problem with add new row to a table that have primary key as autoincrement number. The app keeps return exception with the message that "DEFAULT or NULL are not allowed as explicit identity values.". Anyone has any idea.

    Thanks.

     
    • Aikiken

      Aikiken - 2007-01-03

      I have aquestion here too and I hope someone answers it faster then your was answered...

      Any way, I think what may be happenning to you is that you are trying to create a child record independently.

      The way that works is this:

      Parent Record I will name PR for the sake of excersize,

      myBiz.childRecord CR = PR.NewChildRecord();

      //Then you can add it's other attributes as you need to.

      CR.field = "content";

      and finally:

      DataManager.CommitAll();

      I hope this helps.

      Aikiken

       
    • Caleb

      Caleb - 2007-02-05

      That error was happening with SQL 2005 because the identity columns were not identified correctly. There is a fix in the help forum.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.