Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grant select permission in SQL tables
Message
From
15/03/2005 04:49:29
Jon Neale
Bond International Software
Wootton Bassett, United Kingdom
 
 
To
14/03/2005 19:07:04
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:
00995850
Views:
18
Hi James,

I'm glad that worked for you.

I have a question that you may be able to help me with.

I have a colleague that is looking to relocate to Australia (Melbourne area). He's interested to know,

What the current work opportunities are like?
If its possible to get contact information for IT firms in the area?
Specific skills that are popular right now in Aus?

His current skill set is VB6,VFP,ASP,HTML,JAVASCRIPT and SQL Server 2000.

Please excuse the direct message regarding this but its always really interesting to know what's happening in another country.

Regards

Jon

>It works beautifully. Thanks.
>
>>Try this.
>>
>>/* declare the variable for the current table and schema */
>>declare @CurrTable varchar(40), @CurrSchema varchar(40)
>>
>>DECLARE tables_cursor CURSOR FOR
>>SELECT TABLE_NAME, table_schema
>>FROM INFORMATION_SCHEMA.TABLES
>>WHERE TABLE_TYPE = 'BASE TABLE'
>>
>>OPEN tables_cursor
>>
>>-- Perform the first fetch.
>>FETCH NEXT FROM tables_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.
>> -- EXEC sp_addrolemember 'db_datareader','Jon'
>> FETCH NEXT FROM tables_cursor into @CurrTable, @CurrSchema
>>
>> /* grant permission, but 'grant' does not like @CurrTable */
>> /* grant select on @CurrTable to ReadOnlyUser
>> EXEC ('GRANT SELECT ON [' + @CurrTable + '] TO ReadOnlyUser')
>>END
>>
>>CLOSE tables_cursor
>>DEALLOCATE tables_cursor
>>
>>Jon
>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform