Fixing Oracle’s TableAdapters

Ok, by now you know Oracles table adapters are broken. Just searching on google for a solution turns up a significant number of other people having the same issues. Broken code, bad ODP crashes inside devstudio etc etc etc. Google turns up nothing but bad news when you’re looking for a solution to ease the pain of using .Net and Oracle tools.!

Well, since the fixes are pretty easy to add, I’ve created a little tool to automate the process. Although the fixes are quite simple, they soon mount up when you got more than a couple of TableAdapters that change more than a couple of times during the life of the project. In fact fixing oracle’s bugs starts eating a significant part of your development time, beyond the most trivial projects with one or two adapters. Maybe we should start invoicing them for the time taken to fix their crap code 😉

ok, enough of the idle banter. Since a picture is worth a thousand words here’s a screen grab of the tool to whet your appetite!

orablefixer

Ok, I admit I stole the graphic! Basically this fixes the current crop of problems that the ODT generates when you drag a stored procedure or table to the VS’s Dataset design surface. As an additional ‘fix’ it also makes the Adapters CommandCollection public if you tick the check box.

Making the CommandCollection public means that you don’t have to derive a class from the generated table adapter, or provide another partial class when you want to do things like change the connection string on the fly, or make the commands participate in a transaction.

For those of us unable to use an ORM too or we’re just stuck with Oracle and the default tools for legacy code, this should help a little.

Anyway, I’m going to register a domain for the tool, and provide an online version too, where you upload a source file to fix, and it returns the fixed version. Maybe when there’s a public domain showing how to fix Oracle’s deficiencies, they’ll release a patch for a bug that’s been on metalink for what feels like *eternity*.

Watch out for FixMyOracle.Net coming soon 😉

This entry was posted in General. Bookmark the permalink.

Leave a Reply