Start a new topic

Exception when viewing SQL Server function or stored procedure

[This topic is migrated from our old forums. The original author name has been removed]

I've been getting exceptions on the Function Editor tab (eg. "com.onseven.dbvis.G.B.L: Function schema.fn_xxx does not exist") when attempting to browse functions or stored procedures in a particular MS SQL Server 2005 database. I could see the name of the function in the object tree, but not view the underlying code in the Function Editor. Further testing revealed that the account I was using had only execute privileges on the DB objects in question; when using an admin level account I experienced no problems. It seems to me, though, that if the user account in use does not have sufficient privileges to view the text of a function or stored procedure, that they should be presented with a warning message to that effect, not the Debug Window with an exception.

[This reply is migrated from our old forums. The original author name has been removed]

Re: Exception when viewing SQL Server function or stored procedure
Yes, that's better, though I might have suggested putting the "Source code is not available" message in the Procedure/Function Editor area rather than in the status bar (since that's where the user's focus is). Also, I've noticed that the "not available" message text is usually but not always in red, although I've been unable to reproduce this consistently. Thanks for making the change.
[This reply is migrated from our old forums.]

Re: Exception when viewing SQL Server function or stored procedure
Steve, This is fixed in the just released 6.5.5 version. http://www.minq.se/products/dbvis/download/ Regards Roger
[This reply is migrated from our old forums. The original author name has been removed]

Re: Exception when viewing SQL Server function or stored procedure
> {quote:title=Hans Bergsten wrote:}{quote} > We have changed the behavior for this case so that no output is written to the debug window. Instead a "source not available" message is shown in the Procedure Editor footer. This change will be part of the next maintenance release, 6.5.5. Sounds good. Thanks.
[This reply is migrated from our old forums.]

Re: Exception when viewing SQL Server function or stored procedure
Hi Steve, We have changed the behavior for this case so that no output is written to the debug window. Instead a "source not available" message is shown in the Procedure Editor footer. This change will be part of the next maintenance release, 6.5.5. Best Regards, Hans
[This reply is migrated from our old forums. The original author name has been removed]

Re: Exception when viewing SQL Server function or stored procedure
Hi Roger, I've pasted a copy below of the exception that I see in the Debug Window when I click on the function in the object tree. ----- Debug Printouts ----- com.onseven.dbvis.G.B.L: Function dbo.fn_ClipTime does not exist at com.onseven.dbvis.S.A.F.?(Z:2062) at com.onseven.dbvis.b.B.A.A.K.?(Z:3544) at com.onseven.dbvis.b.B.A.A.J.?(Z:1314) at com.onseven.dbvis.b.B.E.?(Z:3046) at com.onseven.dbvis.b.B.E.?(Z:3195) at com.onseven.dbvis.b.B.E.?(Z:759) at com.onseven.dbvis.b.B.E$1.ancestorAdded(Z:1320) at javax.swing.AncestorNotifier.fireAncestorAdded(Unknown Source) at javax.swing.AncestorNotifier.componentShown(Unknown Source) at java.awt.Component.processComponentEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at com.onseven.dbvis.J.A.g.dispatchEvent(Z:2143) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)
[This reply is migrated from our old forums.]

Re: Exception when viewing SQL Server function or stored procedure
Steve, If possible please post the complete stack trace you get. Best Regards Roger
[This reply is migrated from our old forums.]

Re: Exception when viewing SQL Server function or stored procedure
Hi Steve, Thanks for your post! We will look into a better presentation for authorization issues. Best Regards Roger