Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grant select permission in SQL tables
Message
De
10/03/2005 05:10:50
Jon Neale
Bond International Software
Wootton Bassett, Royaume Uni
 
 
À
09/03/2005 21:29:28
James Chan
Objectmastery Pty Ltd
Hawthorn, Australie
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
00993894
Message ID:
00994337
Vues:
19
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
>>
>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform