Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
michaelxvo
Starting Member
47 Posts |
Posted - 2007-03-29 : 11:17:30
|
Hello senior dbaI have a situation:I have a table invoices. I set a role EMPLOYEES for all employees to be able to SELECT AND UPDATE. EVERYTHING WAS FINE BEFORE.Now I just add 2 more fields to the table invoices: amountpaid, and comments.from the pc of the Administrator, I can update the new fields,but the employees cannot update the new fields.They are still in the EMPLOYEE ROLE with no change.What can I do to make them able to update the new fields |
|
snSQL
Master Smack Fu Yak Hacker
1837 Posts |
Posted - 2007-03-29 : 11:37:38
|
If you gave update permission on the table then they have update to the new columns. Did you perhaps originally give the update permissions on the columns rather than the table (which is possible but not usually recommended).If you did give permissions on the table and they cannot update those columns, then maybe it's because your client application or query isn't returning those columns - ie. nothing to do with permissions. |
 |
|
michaelxvo
Starting Member
47 Posts |
Posted - 2007-03-29 : 11:47:53
|
quote: [i]Originally posted by snSQLIf you did give permissions on the table and they cannot update those columns, then maybe it's because your client application or query isn't returning those columns - ie. nothing to do with permissions.
This is my select statement"grant select,update on invoices to EMPLOYEE"The problem is the 2 new columns were added after I created the role EMPLOYEE and gave permission to table invoices. Does this cause the employee not able to update the new column? |
 |
|
mcrowley
Aged Yak Warrior
771 Posts |
Posted - 2007-03-29 : 12:02:13
|
Did you use Enterprise Manager to add the new columns? If you did, I suspect the permissions for the INVOICES table have been totally cleared, not just the last two columns. Enterprise Manager creates a brand new table behind the scenes for any table modification. |
 |
|
michaelxvo
Starting Member
47 Posts |
Posted - 2007-03-29 : 12:12:54
|
quote: Originally posted by mcrowley Did you use Enterprise Manager to add the new columns? If you did, I suspect the permissions for the INVOICES table have been totally cleared, not just the last two columns. Enterprise Manager creates a brand new table behind the scenes for any table modification.
When I add the 2 new columns, I use T-SQL like this:alter table invoicesadd paidamount money null, comments varchar(200) nullThe problem is from my PC as dbo I and update the 2 columns, but from other employees, they update from the application, but it is not updated in the database |
 |
|
snSQL
Master Smack Fu Yak Hacker
1837 Posts |
Posted - 2007-03-29 : 12:30:44
|
What I'm saying is that in the application, if the table is queried like thisSELECT col1, col2FROM tableand you have added col3 and col4 then the users are not going to see col3 and col4, not because they don't have permissions to them, but because the application doesn't know about them. |
 |
|
|
|
|
|
|