The UPDATE permission was denied on the object

The UPDATE permission was denied on the object

  
Hi,

The service account (sql username/password) has been configured in the service center and I am using the Entity action (CreateorUpdate) to save the record. I am following same process in another project, it is working fine and getting error on this project, not able to save the record. 

Here is the error message:-

The UPDATE permission was denied on the object 'tableTest1', database 'databaseName', schema 'dbo'. 


thanks in advance.
Sam
Hi Sam

That error is a SQL Server exception caused by lack of the UPDATE permission over that table by that user.

Using SQL Server Management Studio, access your SQL Server database 'databaseName', and confirm that the user you're setting on service center for the database connection actually has the SELECT, UPDATE, INSERT and DELETE privileges over that database, or just only over the 'tableTest1' object.

Cheers

Miguel Simões João
Hi Miguel,

The service account got full access (as dbowner) to the database. I logon to sql query analyser with service account username and password, i was able to insert a record. But, thru outsystems it was failed and given me that error message.

Thanks,
Sam
Hi,

In addition to the service account, "OSRuntime"  should have access rights too. So, I have given datareader and datawriter access rights for "OSRuntime" user and everything was working fine.

Thanks,
Sam
What do you mean with "OSRuntime" what is that?  the user connecting to your database ? is it an active directory user in your server?
OSRuntime is the database user used by OutSystems apps in runtime. It's configured in the Configuration Tool, while installing the platform on-premises.
Hi,

Backing a bit to the main question here, if you are configuring a database connection, then only the user you configure there needs the permissions.
There should be no need to do specific grants on the platform user for database connections (expecially they can be in different systems where the user doesn't even exist)

Oscar, if you are also having a similar problem I would like you to explain it before trying to "hammer" a solution.
:)

Regards,
João Rosado