Start a new topic

Comments are automatically extracted before sending queries

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

Although it is per the configuration warning (attached), it is still a bug, as it prevents commenting in stored procedures, functions, and views. when I send the sp code to a server: create procedure do_smth as begin -- Comment end The comments are lost and I have no reasonable way to communicate in the code. If I turn comment delimiters to something else, then comments are not highlighted and code looks very confusing. Advice?

[This reply is migrated from our old forums.]

Re: Comments are automatically extracted before sending queries
Hi Vlad, If you are using DbVisualizer Personal with a supported database type, I suggest that you use the Procedure Editor to edit the procedure instead. It does not extract any comments. See the Users Guide for details: http://www.dbvis.com/products/dbvis/doc/main/doc/ug/procEditor/procEditor.html Alternatively, you can place the statement with comments within an SQL block or use Execute Buffer instead of Execute to keep the comments intact: http://www.dbvis.com/products/dbvis/doc/main/doc/ug/sqlCommander/sqlCommander.html#mozTocId652495 http://www.dbvis.com/products/dbvis/doc/main/doc/ug/sqlCommander/sqlCommander.html#mozTocId958847 Best Regards, Hans
[This reply is migrated from our old forums. The original author name has been removed]

Re: Comments are automatically extracted before sending queries
Hans, Thank you for the response. Yes, I do use DbVisualizer Personal 8.0.6 Build: #1737 (2011/11/21 21:15) on OSX Lion connecting to MS SQL Server via jTDS. I see the option for stored procedure. There are, however, two gaps in scenarios you suggest, which make you suggestions hard to apply for my scenario. Often I need to edit objects created by other team members - and I have no luxury to demand them using block comments simply because I use DB Visualizer. Also, stored procedures are not the only objects need editing. As I mentioned, views and functions are also subject to the same issue. Additionally, we often edit jobs, job steps, schedules, and something else. Some of these objects, like job steps, normally retain comments - or remove them if I use DB Visualiser. Sincerely, Vlad
[This reply is migrated from our old forums. The original author name has been removed]

Re: Comments are automatically extracted before sending queries
Execute buffer is obviously an option - thank you for pointing it out. I know that I will forget to use it eventually and cause some frustration.
[This reply is migrated from our old forums.]

Re: Comments are automatically extracted before sending queries
Hi Vlad, I realize that it may be hard to remember to use Execute Buffer or enclose code you get from others in SQL Block delimiters. That's why we recommend using the Procedure Editor. There are editors for other object types as well, such as functions and triggers. The reason we strip off comments from SQL executed in the SQL Commander is that many databases cannot handle them, but we could of course add a property for controlling this. I will open a ticket for that. Best Regards, Hans
[This reply is migrated from our old forums. The original author name has been removed]

Re: Comments are automatically extracted before sending queries
Hans, Thanks for considering this. I have little idea, though, if the "option" should be on global, db type, or a specific connection level. Well, I wouldn't go with global given you comment about DBs not supporting them... Vlad
[This reply is migrated from our old forums.]

Re: Comments are automatically extracted before sending queries
Hi Vlad, We'll see, but making it a database type property makes most sense. Database type properties can alternatively be set for just a specific connection. Best Regards, Hans