Hi,
I Have a Table: Table1 and a view: View1.
View1 returns a subset of the rows of Table1 (Only the rows the user should have access to). I give the user INSERT and UPDATE and SELECT permissions on the view. The View1 owner and Table1 owner are the same (DBO). I use a TADOQuery component with a TDataSource and a couple of controls linked to it.
I run the app...it returns the right rows. The problem is when I try to make changes. When I try to INSERT or UPDATE a row (when I call post or UpdateBatch), I get a message saying I don't have UPDATE or INSERT permissions on Table1 (depending on the operation I performed). I don't understand why the ADO query is even trying to update the underlying table....
when I run an insert statement in query analyzer on View1 (INSERT and/or UPDATE), everything works out fine. If I set INSERT/UPDATE permissions on the underlying table (Table1) everything works fine from the application, but I don't want to do this. Any ideas?