We have an in-house built code generator that takes care of database access. One writes stored procedures and gets corresponding methods abstracted in a gateway class.
We also generate web services in order to properly interface with Flash -- i.e. handling exception in a sane manner.
Finally we have an exception generator that takes away the drudgery of exception best practices (tons of constructors, etc...)