Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 17th, 2004, 06:02 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
Default Create "View" and Assign Permission

Hi All,

Is there a way to assign permission when I do a "Create View?"
The reason is I have an ASP page where user do some query against the created view. The problem is, everytime users does that, they get an error message saying, (select, update, etc.)permission is denied.

Here is my Create View statement I enter in Query Analyzer:

Create View TestTable As
Select......

Any idea how to set permission(rights) here?

As always, thank you for your help.

Leon


 
Old June 17th, 2004, 06:13 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Once the view is created, use this to grant required permission for the user on that view.

Code:
Grant Select,Update on <VIEWNAME> to <USERNAME>
Hope that helps.
Cheers!

_________________________
-Vijay G
Strive for Perfection
 
Old June 18th, 2004, 11:13 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you Vijay!!! I can count on you again. :-) Such a simple thing, but I can't find it anywhere in this 1000 pages SQL book that I bought. Any good books or references you can refer me to?

THanks.

Leon

 
Old June 18th, 2004, 11:57 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Leon,

The ones I refer are of SQL 7.0 and 6.5

But I rely on Sql server Books online. The best bet. You never miss out anything from there, if you get used to that.

Will let you know if I find some book useful.

Hope that helps.
Cheers!

_________________________
-Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
Assign Session variable from view or controller Alaphat ASP.NET 2.0 Professional 2 April 11th, 2008 09:37 AM
permission to create a excel sheet on server rajiv_software Classic ASP Basics 2 April 11th, 2005 12:41 AM
permission to view report collie BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 February 12th, 2005 05:13 PM
login domain account and view a permission folder cslimcom Classic ASP Databases 0 December 22nd, 2004 10:24 PM
assign socket permission to ntd winform zhebincong General .NET 0 September 29th, 2004 04:05 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.