New ADO.NET 2.0 book: Professional ADO.NET 2: Programming with SQL Server 2005, Oracle, and MySQL is out

My friend and a MVP Bill Ryan co-authored a brand new ADO.NET 2.0 book Professional ADO.NET 2: Programming with SQL Server 2005, Oracle, and MySQL. I haven’t seen the book yet, but judging by names involved I guess it is worth checking it out. Anyway, he blogs about being involved in writting this book here.

.net DevExpress

CodeRush and Maintenance Complexity

Did you ever wonder what does mean CodeRush’s Maintenance Complexity tool window (accessible via DevExpress/Tool Windows/Metrics menu item). Here is Mark Miller’s blogging about it and it explains what those numbers actually means. I examined few classes of mine and saw that I have few methods above 300 but not many. I guess I have to improve myself a bit (or change metrics weights).


If you are still on .net 1.1 there is a post SP1 hotfix

If you are still using .net 1.1 you might be interested in this post service pack 1 hotfix for System.Windows.Forms.dll released by Microsoft (thanks to Jochen Kalmbach for the info).
From the info page:

“The following issues are fixed in this hotfix package:

889411 ( Description of the .NET Framework 1.1 hotfix package: December 10, 2004

885446 ( FIX: You may experience unexpected behavior when you press TAB or ENTER in a Windows Form on a computer that is running the .NET Framework 1.1 S885446

833047 ( FIX: Menu mnemonics fire on the wrong forms in a multiple-document interface (MDI) Windows Forms application “


How to upgrade application version and not loose user application settings

If you have been using or considering using new application settings feature in VS 2005 you might be wondering how not to loose user settings when you increment assembly version. The thing is that user settings are not automatically upgraded and you loose them if you don’t do anything. Note that you loose only user settings while application settings are stored in app.config (or web.config) and are always there. The answer has two parts:

  1. If you use ClickOnce deployment it will take care of upgrading.
  2. If you don’t use ClickOnce then you have to call Update method of ApplicationSettingsBase derived class (that is normally called Settings and created for you by the IDE). The acutall call would be something like

         Settings.Default.Update(); [C#]
         My.Settings.Update()   [VB]

But how do you know when to call the Update method? This is a trick I learned from a blogger I can’t remember right now, I think he is a MS employee (sorry):

  1. Define a user settings called i.e. UpdateRequired of type bool (the easiest way is through IDE). Make sure its default value is true.
  2. At the start of the application type this code:

      if (Settings.Default.UpdateRequired)
         Settings.Default.UpdateRequired = false;

So the Update will be called only after the version changes and only one time (since you disable further updates by setting UpdateRequired = false until version changes – when the property regains default value of true).

Have fun, application settings are worth exploring.


SLODUG/INETA Visual Studio 2005/SQL Server 2005 launch event

SLODUG/INETA invites you to SLODUG/INETA Visual Studio 2005/SQL Server 2005 Slovene users group launch event on 7th December starting at 17:00. The event will take place in Microsoft Slovenija, Šmartinska cesta 140, Ljubljana conference room. You’ll find more details at Slovene CodeZone link. If you aren’t a member yet, please register at the previously mentioned link.

.net DevExpress

Upgrading DevExpress WinForms controls to 2.2.1

As soon as I downloaded the new WinForms Component Collection 2.2.1 for Visual Studio 2005 I installed them, turned the visual inheritance “experimental” support on opened an existing project. It won’t compile though because you have to manually update the references: remove DevExpress.* ones from each project that uses them and re-add them. This will fix all problems of upgrading. Now, the interesting fact is that if you initially look at the references (before updating) everything seems ok – while the project has all sorts of problems you would expect when there are bad references. Not sure whether this is a problem with Visual Studio 2005 or not.

.net Slovenia

Slides of my "What’s new in .net 2 framework and programming languages" presentation

Yesterday I held “What’s new in .net 2 framework and programming languages” presentation at VS2005/SQL2005 launch event. You can find slides (in Slovene) here. Are you ready to rock?

.net DevExpress

Developer Express reintroduced visual inheritance support

I have to admit that this Thursday really surprised me in positive way. Or better, Developer Express guys did it. They just released a service release of their Windows Forms range of products with enabled support for visual inheritance as it was in old days. It is still turned off by default; however, you have an option to enable it by entering a proper registry key (they provide an utility for that, too). Somehow they managed to workaround all the hurdles (regarding VI) that MS introduced in Visual Studio 2005. That makes me very happy as I had tons of problems because VI disappeared in recent month. Great move, DevExpress and I guess MS should follow them.