Showing posts with label delete. Show all posts
Showing posts with label delete. Show all posts

Friday, March 30, 2012

restrict delete function on odbc connection

i have the odbc connection connected to our SQL databasse via sql user
account through MS access Frontend and having problem controling the delete
function of the account.

In SQL i am only allow the account to read, insert,update and denied delete
on the database and tables. However, the account still be able delete the
records.

Can someone let me know what am i missing in the permission granting.

Check individual permissions, groups permissions and what is important the permissions granted to the public role where every database user will be added to.

Jens K. Suessmeyer

http://www.sqlserver2005.de

Restrict delete from a table

Hi

I need to restrict delete from one table by any user of SQL. How can we do this? This is our master table and we dont want any one to delete data from this table.

Thanks
BalaTry Cascade ON DELETE NO ACTION, you can use either code or set it on the table properties. Run a search for Cascade Delete in the BOL(books online) for more examples. NO ACTION is an ANSI SQL DRI(Declarative Referential Integrity) rule that prevents Deletes from tables. Hope this helps

CREATE TABLE order_part
(order_nmbr int,
part_nmbr int
FOREIGN KEY REFERENCES part_sample(part_nmbr)
ON DELETE NO ACTION,
qty_ordered int)
GO

Kind regards,
Gift Peddie