Sunday, March 11, 2012

Access to tables SQL Server 2005

Hello!

I have a application where users are supposed to edit data from a table in a datagrid.

I want to use a dropdownlist to let the user choose a table to edit.

The users are members of different windows-goupes and different users have only access to edit there own tables. Let's say that they own data in different tables.

Is it possible to use windows authentication to find out what tables to show in the dropdownlist?

If it is, how do I get the names of the tables?

Best regards

Per

This query 'should' provide a list of ONLY the tables whereon the user has at least SELECT permission.

Code Snippet

SELECT TABLE_NAME

FROM INFORMATION_SCHEMA.TABLES

|||

Thank you!

That is very useful.

//P

No comments:

Post a Comment