Permission problem with sql server option

patricpatric Member Posts: 12
Hiyas,

we're using Navision 4.01 SQL Server Option.
I've git the following problem:

We created a report to copy one record into another record in the same table like:

source.GET(1);
target.INIT;
target.TRANSFERFIELDS(source);
target.ID := 2;
target.INSERT;

If I am logged in as a dbowner or sysadmin the function works fine.
But if i'm logged in as public user with already synchronized rights
to this table (RIMD) I'll get the following error:

"...The current user is not the database or object owner of table XY. Cannot perform SET OPERATION.

SQL: SET IDENTITY INSERT [Tablename] ON "

The report also got full permissions this table.
If I enter a new record directly in this table as a public user, everything works fine.

Thanks in advance for your help.

Kind regards
Patric

Comments

  • bobnavisionbobnavision Member Posts: 159
    user should be part of either the db_ddladmin or the db_owner database role in addition to the bulkadmin server role.

    Microsoft has declared this as problem on SQL Server 2000.
  • kinekine Member Posts: 12,562
    It means, that you are trying to manually set field which is Autoincrement!

    It seems like the target.ID is Autoincrement field - in this case you need to assign 0 to let SQL assign correct no.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • patricpatric Member Posts: 12
    Thanks kine - your answer solved my problem.

    Kind regards
    Patric
Sign In or Register to comment.