Skip navigation.

Syndicate

Syndicate content

User login

The Astonishingly Shitty MySQL

Recently I’ve tried to teach the Iraqi developers about the ASP.NET GridView, and how easy it makes displaying and editing multiple records. Unfortunately, we’ve had a helluva time making it work with MySQL.

First, we were using the ODBC.Net ADO.NET provider, and the 3.52 MySQL ODBC driver. This works fine, except the MySQL ODBC driver doesn’t support Unicode, a minor detail which means Arabic script is turned into garbage en route to the database! Supposedly, Unicode support is coming in the next version of the driver, discontinuously numbered ‘5.0’, which has been in development for over 1.5 years and is still in alpha; I was unable to get it to even install on my laptop without cryptic errors about missing files.

“No problem,” I said. “We should be using the native MySQL .NET Connector anyway”. Right. The trouble there is the ‘connector’ is an ADO.NET 1.1-style provider, which doesn’t support DbProviderFactory, and thus cannot be made to work with the asp:SqlDataSource control, which in turn means all the great stuff you get for free in the GridView isn’t available either. Now we have to figure out how to short-circuit the GridView so we can enable the editing functionality separate from a SqlDataSource; it must be heartening to the Iraqis to see that we sophisticated technologically advanced Westerners still can’t get something as simple as an editable data-bound grid to work right.

MySQL AB, if you’re listening: get a clue, and patch the 3.52 driver series to support Unicode, or update the .NET Connector to implement the ADO.NET 2.0-style APIs.