SET_IDENTITY_INSERT ON / All Users are public ?!

recallrecall Member Posts: 36

I have a SQL-DB with Nav. 4.0.
When I tried to Access the table Shipment Order line, a SQL-Error occured saying that the command SET_IDENTITY_INSERT ON could only be executed by Admins or the owner of the table.
I can't make all the users admin, and only one can be the owner.
Would can I do?



  • bbrownbbrown Member Posts: 3,268
    What type of access are doing (read, insert, delete, modify)?
    What are you attemping to do?

    Does your table have any AutoIncrement fields?
    There are no bugs - only undocumented features.
  • Michael_SchumacherMichael_Schumacher Member Posts: 81
    recall wrote:
    can't make all the users admin, and only one can be the owner.

    Of course can you make them all the owner :wink:
    Just put a Checkmark in the box before DBO where you define database access for the users.
    In the upper window you click in the box of the wanted Database and in the lower window are the roles you can give for this DB.
    public is automatically signed and below that is dbo.
    Michael Schumacher

    oh, what day is it? Backup day. OK, let's dump all data to /dev/nul ;-)
  • bbrownbbrown Member Posts: 3,268
    This error occurs because you have defined a field as AutoIncrement and are attempting to insert a non-null value. This is referred to as an identity insert in SQL. The field value is usually supplied by the system but you want the system to accept the value you are supplying.

    The only time you would be doing this is either a restore or a dataport. These should be done by a user with sufficient rights. If you are getting this error in daily transactions than you need to review the code.
    There are no bugs - only undocumented features.
Sign In or Register to comment.