Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Wife and kids are leaving for holiday (it’s not off-topic)

My wife and kids are leaving for holiday (without me). Bad thing is that I will miss them, good thing is that I will finally finish my SSMS add-in I promised. If you are not aware about it, read here why I am developing it.

After this SSMS add-in development experience I truly admire Red Gate developers for what magic they can do within their SSMS add-ins (especially Red Gate Source Control). It is really biggest development headache I ever had. One example for all – I was trying to be precise as guys from Red Gate are and put icon to SSMS menu items (I can’t sleep without that!). It perfectly distinguishes which menu items belong to which add-in, especially if you have several different add-ins installed:
 

 
It was easy but you can’t use traditional TreeView techniques because SSMS disposes and recreates context menu on every click. That’s why I solved it by ContextMenuStripChanged event and push my commands if context menu exists.
 
It’s not interesting as next point.
 
This was to put icon on SSMS Tools menu item:

 
I thought – ok, you’re former MS Certified Solution Developer for Winforms .NET, no problem to put it there… NO! It’s even not possible in C# I had to ask my friend who is familiar with C++ to do that!
 
You must create satellite assembly in C++ and register your menu item using this code:

var command = commands.AddNamedCommand2(
                    (AddIn)addInInst,
                    "ShowSQLTreeoSettings",
                    "SQL Treeo",
                    "Displays the SQL Treeo Settings Dialog",
                    false,
                    101,
                    ref contextGuids)

Where 5th is information to get icon from own resource and 6th parameter is identifier of the icon resource. Whole Google and Interet is almost silence about that, it took couple of hours :)

Anyway, here is “list” of features which should work now:

  • Create custom folders in SSMS’s object explorer using drag&drop. It works for databases, stored procedures, functions, views and tables
  • Ctrl+click on object will bring ALTER script (my favourite)
  • Perform bulk operations in explorer-style management dialog – I did that because I while I was refactoring and re-foldering more objects, drag&drop was not enough

If you’re interested in more features you can let me know here.
Please bear with me, it will be available soon.
 
PS: I found out that I wasn’t receiving any emails from contact form during last week, if you registered for notification of release, I probably didn’t get your email.




Jakub Dvorak @ www.sqltreeo.com

 

Comments

Posted by Anonymous on 8 July 2011

Pingback from  Dew Drop – July 8, 2011 | Alvin Ashcraft's Morning Dew

Posted by Charlie on 9 July 2011

In 10 years time nobody will remember your SSMS development but the kids might remember that you weren't on holiday with them and you'll have missed a part of them growing up. SQL will always be here when you get back.

Posted by Jakub Dvorak on 11 July 2011

You are absolutely right of course. But I was inaccurate about my family situation. My wife is leaving with several of her female friends and their kids to spend their every-year purely female part of the holiday. So fact that I will  be isolated from kids for a while have nothing to do with my job or SSMS add-in :)

Leave a Comment

Please register or log in to leave a comment.