View is not updatable if I use "Update using view rules"

Hellgofi

Registered User.
Local time
Today, 18:18
Joined
Apr 22, 2005
Messages
36
I am using Access 2007 with SS 2005. Below code selects multiple fields from 3 different tables. If I choose the option "Update using view rules" then I cannot update the records in that view. However If I dont choose that option then the view is updatable. The problem is that I dont want to give users permissions on tables. I am trying to give permissions on views only. If I dont choose "update using view rules" then I have to give users permissions on tables which I dont like.

Am I missing something in that code or relationship? What should I do to use view permissions instead of table permissions?
thank you

Code:
SELECT
dbo.MusteriMalzeme.MusteriID, dbo.MusteriMalzeme.MalzemeID, dbo.Malzeme.MalzemeKodu, dbo.Malzeme.MalzemeAdi, dbo.Malzeme.AnaKod, dbo.UrunSpec.En, 
 dbo.UrunSpec.Boy, dbo.Malzeme.isActive
FROM 
dbo.UrunSpec INNER JOIN dbo.MusteriMalzeme ON dbo.UrunSpec.MalzemeID = dbo.MusteriMalzeme.MalzemeID INNER JOIN
dbo.Malzeme ON dbo.MusteriMalzeme.MalzemeID = dbo.Malzeme.MalzemeID
WHERE     (dbo.Malzeme.isActive = 1)
 
Hi Hellgofi,

Wild guess here: are the values you are submitting in the update/insert statement honouring the rules of the view?
Choosing the option "Update using view rules" places additional rules on the data you are submitting. One such additional rule from your view:
Code:
WHERE (dbo.Malzeme.isActive = 1)
Hope that helps.
 
Hi Hellgofi,

Wild guess here: are the values you are submitting in the update/insert statement honouring the rules of the view?
Choosing the option "Update using view rules" places additional rules on the data you are submitting. One such additional rule from your view:
Code:
WHERE (dbo.Malzeme.isActive = 1)
Hope that helps.

Hi Pierrick,

I am using "update using view rules" just to give users permissions on views instead of tables and I am not adding any contraint to view. Access doesnt allow me to enter / update any data and says directly "recordset is not updateable" as if it's a snapshot. If I remove "update using view rules" and give enough permission to users on joining tables it works, almost every data becomes updateable and insertable. I am using an adp file.

thank you for your response.
 

Users who are viewing this thread

Back
Top Bottom