Table Access Control

  • I am trying to control the table access permission using trigger based on application, but system is throwing error message.

    Here is the code

    CREATE TRIGGER [Tr_ServerLogon]

    ON ALL SERVER FOR LOGON

    AS

    BEGIN

    declare @appname VARCHAR(512)

    SET @appname = APP_NAME()

    if ('.Net SqlClient Data Provider'=@appname)

    GRANT DELETE ON [ArgonSar].[dbo].[customerMaster] TO [weaveit]

    else

    DENY DELETE ON [ArgonSar].[dbo].[customerMaster] TO [weaveit]

    END

    GO

    Please suggest me, what I should do.

  • No Suggestions? :hehe:

    .

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply