Reading User Permissions

B

Berny

Can someone point me in the right direction?



I am trying to turn-off (hide) specific objects on a form based on the
current user's permissions (access).



I was trying to use the Permissions() function but I can't seem to figure it
out.



When I use the following in the Query used for the Form:

permissions(dbo.SD_Rqs.Scoped)



I get an error message that reads:

"Syntax error converting the varchar value 'N' to a column of data type
int."



I get the same error when I try the following conversion:



CONVERT (varchar(20), permissions(dbo.SD_Rqs.Scoped))



Am I using the proper function? Or should I be using some other technique?



Any help would be greatly appreciated.
 
B

Berny

I'm sure "Sp_helprotect is the key..." but my knowledge is very limited in
sql.

Is there an easy way of seeing if someone has update permission on a field
in one of my existing Queries?
 
O

oj

Try:

select case when permissions(object_id('tbname'),'colname') & 2=2 then 'user
can update' else 'user cannot update' end
 
B

Berny

THANK YOU!!!!!!!!!!

This problem has been driving me nuts for the past couple of weeks.

Again, Thank You!!!!!!!!!

Your help is greatly appreciated!!!!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top