Microsoft KB Archive/166682

= PRB: Database Object Permissions Overwritten in SQL Enterprise Manager =

Article ID: 166682

Article Last Modified on 5/2/2006

-

APPLIES TO


 * Microsoft Visual InterDev 1.0 Standard Edition
 * Microsoft Visual InterDev 6.0 Standard Edition

-



This article was previously published under Q166682



SYMPTOMS
Any permission changes made using SQL Enterprise Manager, or similar tools, while a database object is open in the Visual InterDev Source Editor is overwritten when the object is saved from within Visual InterDev.

This applies to developers and users that have SQL Server or Oracle dataconnections.



CAUSE
Microsoft Visual Database Tools checks permissions on a object at the time that the object is loaded into the Source Editor. When the object is saved, those permissions are not rechecked. Visual InterDev saves the database objects with the same permissions with which it was opened. This behavior overwrites any changes that have occurred since the object was opened.



RESOLUTION
Verify that the object is not open in a Visual InterDev Source Editor when the permissions are being changed. Alternatively, do not change permissions on an object that is open in the Visual InterDev Source Editor.



STATUS
This behavior is by design.



Steps to Reproduce Behavior

 * 1) Launch Visual InterDev and SQL Enterprise Manager.
 * 2) Create a project in Visual InterDev and add a SQL data connection.
 * 3) Open a stored procedure from the data connection into the Source Editor.
 * 4) Using SQL Enterprise Manager, change the permissions on the stored procedure that is open.
 * 5) In Visual InterDev, save the stored procedure.

The permission changes made in SQL Enterprise Manager are lost. The Stored Procedure permissions revert back to those it had when the procedure was opened into the Source Editor.

NOTE: To verify in the SQL Enterprise Manager that the permissions are indeed the same as those when the procedure was opened in the Visual InterDev, right-click the "Stored Procedures" folder in the SQL Enterprise Manager and select Refresh from the shortcut menu.

