How do I make a view non updateable? I want to create a view so that I
will not be able to update, insert or delete the view so that base
table is not affected (except dropping the view itself). Thanks. 4 4948
On Mar 23, 4:06 pm, othell...@yahoo.com wrote:
How do I make a view non updateable? I want to create a view so that I
will not be able to update, insert or delete the view so that base
table is not affected (except dropping the view itself). Thanks.
I have tried:
revoke delete,insert,update on v_t1 to dbo
bit its not working...
On Mar 23, 4:13 pm, othell...@yahoo.com wrote:
On Mar 23, 4:06 pm, othell...@yahoo.com wrote:
How do I make a view non updateable? I want to create a view so that I
will not be able to update, insert or delete the view so that base
table is not affected (except dropping the view itself). Thanks.
I have tried:
revoke delete,insert,update on v_t1 to dbo
bit its not working...
Okay found a solution. If I introduce an aggregate function then it
works. So I ended up aggregating all the columns from the select list.
So instead of saying:
Create view view1 as
Select column1, column2
>From Base_table
Not Updateable:
Create view view1 as
Select column1, column2
>From Base_table
Group by column1,column2
I wish there is an easier way than this.
On Mar 23, 10:34 am, othell...@yahoo.com wrote:
On Mar 23, 4:13 pm, othell...@yahoo.com wrote:
On Mar 23, 4:06 pm, othell...@yahoo.com wrote:
How do I make a view non updateable? I want to create a view so that I
will not be able to update, insert or delete the view so that base
table is not affected (except dropping the view itself). Thanks.
I have tried:
revoke delete,insert,update on v_t1 to dbo
bit its not working...
Okay found a solution. If I introduce an aggregate function then it
works. So I ended up aggregating all the columns from the select list.
So instead of saying:
Create view view1 as
Select column1, column2
From Base_table
Not Updateable:
Create view view1 as
Select column1, column2>From Base_table
Group by column1,column2
I wish there is an easier way than this.
create trigger T_NoUpdates on view1 INSTEAD OF INSERT,UPDATE,DELETE AS
RAISERROR('No updates allowed',16,1)
Damien
On 23 Mar 2007 03:13:01 -0700, ot*******@yahoo.com wrote:
>On Mar 23, 4:06 pm, othell...@yahoo.com wrote:
>How do I make a view non updateable? I want to create a view so that I will not be able to update, insert or delete the view so that base table is not affected (except dropping the view itself). Thanks.
I have tried: revoke delete,insert,update on v_t1 to dbo
bit its not working...
Hi othellomy,
The REVOKE keyword is to revoke a permission that was earlier GRANTed
explicitly.
To explicitly deny access to an object that would by default allow
access, you use DENY:
DENY DELETE, INSERT, UPDATE ON v_t1 TO ALL
However, this will not affect any user in the db_owner database role or
any user in the sysadmin server role, since security checks are bypassed
for these users.
--
Hugo Kornelis, SQL Server MVP
My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Tom wilson |
last post by:
This is driving me nuts. I'm trying to update an Excel spreadsheet
using ADO.Net and Oledb in VB.Net. The connection is open, the
adapter is connected and the dataset is loaded. Here's the code...
|
by: John |
last post by:
I am hoping to create an updatable view from two tables joined on two
fields. I have two questions;
1. How can I enforce a one to one relation in sql server 2005 based on two
fields? Do I need...
|
by: abefuzzleduser2 |
last post by:
I am using sql 2000 (mdb) with linked tables on SQL 2000. I need to
use views to limit users records, instead of direct table access. I
setup a single talbe view in sql and tested update and...
|
by: CSN |
last post by:
Just wondering, is updateable views slated for a
future version of Postgresql? In addition to using
rules that is.
CSN
__________________________________
Do you Yahoo!?
|
by: Sebastian Böck |
last post by:
Hello all,
i have a view defined as a simple select of a table.
This table is inherited by a couple of others.
All entries belong to the child-tables.
I also have an unconditional update rule...
| |
by: dbuchanan52 |
last post by:
Hello,
I am building an application for Windows Forms using. I am new to SQL
Server 'Views'. Are the following correct understanding of their use?
1.) I believe a view can be referenced in a...
|
by: Jim in Arizona |
last post by:
I've been using an example out of a book to be able to edit the rows in a
database. I am getting the following error:
========================================================...
|
by: JC |
last post by:
I created an updateable view, which joins two tables, in a DB2 UDB
database. The view was made updateable by the creation of an "instead
of" trigger. I'd like to use this view for updates via QMF...
|
by: kia.martin |
last post by:
I have a sql database connected with access, but when I try to run
macros which basically just transfer information from tables for
approval an error comes up with "time key is not updateable". I...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |