Board index » delphi » permission on view does not take effect?

permission on view does not take effect?


2005-11-22 08:50:22 AM
delphi221
All,
I'm using Delphi7 with the SQL Server 2000.I encountered a strange problem
when using a TADOQuery which was connected to a view on my DB. The view was
simply based on a table. The user has no rights at all on the table, but
has all rights on the view.
When I set up everything in Delphi and tried to edit a record I received an
error indicating that I didn't have the necessary permission on the AAA
table. Though the SQL Statement in the ADOQuery was : SELECT * FROM
View_AAA.However if I set the CursorLocation property of the adoquery to
ClServer,there is no more such problem. If I don't do that apparently the
permissions on the view are ingored and those on the table are taken.
How is that?
But I need the CursorLocation to be set Clclient because I want to batch
update it. Is there a way out?
Help!
Best regards,
Miles
 
 

Re:permission on view does not take effect?

Hi
Create view with view_metadata attribute.
Micle.
"Miles" <XXXX@XXXXX.COM>writes
Quote
All,

I'm using Delphi7 with the SQL Server 2000.I encountered a strange problem
when using a TADOQuery which was connected to a view on my DB. The view
was
simply based on a table. The user has no rights at all on the table, but
has all rights on the view.
When I set up everything in Delphi and tried to edit a record I received
an
error indicating that I didn't have the necessary permission on the AAA
table. Though the SQL Statement in the ADOQuery was : SELECT * FROM
View_AAA.However if I set the CursorLocation property of the adoquery to
ClServer,there is no more such problem. If I don't do that apparently
the
permissions on the view are ingored and those on the table are taken.
How is that?
But I need the CursorLocation to be set Clclient because I want to batch
update it. Is there a way out?
Help!

Best regards,
Miles