A colleague of mine has been evangelising code-generation for some time now. Although I have been sold on the benefits, I have always fallen short of actually doing it. One hurdle has been that my current project uses Ingres; an RDBMS that none of the major code-generation tools support.
Recently, however, MyGeneration - a free code-generation tool - has given developers the ability to cater for unsupported databases through plug-ins, called MyMeta Plugins. I was able to write one for Ingres 2006 fairly painlessly. The task involves coding a single class that implements the IMyMetaPlugin interface. The main requirement is knowing how to query your particular database's schema\catalog information. You can find the source code, more information and hopefully a working release at the MyMeta Plugin project on CodePlex.
I'm excited to finally be able to use code-generation and enjoy some of the great benefits I keep hearing about.