Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grant select permission in SQL tables
Message
From
10/03/2005 05:10:50
Jon Neale
Bond International Software
Wootton Bassett, United Kingdom
 
 
To
09/03/2005 21:29:28
James Chan
Objectmastery Pty Ltd
Hawthorn, Australia
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
00993894
Message ID:
00994337
Views:
17
I copied this from Books Online, search for fetch and I think fetch next will achieve what you want.

DECLARE authors_cursor CURSOR FOR
SELECT au_lname FROM authors
WHERE au_lname LIKE "B%"
ORDER BY au_lname

OPEN authors_cursor

-- Perform the first fetch.
FETCH NEXT FROM authors_cursor

-- Check @@FETCH_STATUS to see if there are any more rows to fetch.
WHILE @@FETCH_STATUS = 0
BEGIN
-- This is executed as long as the previous fetch succeeds.
FETCH NEXT FROM authors_cursor
END

CLOSE authors_cursor
DEALLOCATE authors_cursor
GO


>You are correct. However, what I really need is to grant the read permission for all tables except a number of confidential tables. My initial plan was to write a "Grant_Persmission" stored procedure which gets a cursor listing of user tables excluding those confidential tables. Then loop through them and grant the permission accordingly. Unfortunately, I stumble on the looping through the cursor using TSQL.
>
>I am sorry for not specifying my problem clearer in the earlier mail. Any idea how I can solve my problem?
>
>Thanks
>
>>I thought the db_datareader role covers this? Is this what you want?
>>
>>Explain a little more if ive missed the point.
>>
>>Jon
>>
>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform