MySql ADO.NET Provider Change

MySql recently acquired ByteFX which made the ADO.NET provider for MySql.  They recently released a new version of their provider with the MySql namespace instead of the ByteFX namespace which also introduces a small but significant change that will affect all .NET MySql users.  You now have to prefix your parameters with "?" instead of "@"!  For backwards compatibility you can add "old syntax=yes;" to your connection string to force "@", but I'm not sure if this will be supported forever or not.  Note that with the WilsonORMapper this means that you specify yourCustomProvider.ParameterPrefix = "?", or add the "old syntax=yes;" to your connection string (but don't do both).

3 Comments

  • Ah. Thanks. That is very helpful.

  • Just a FYI: The MySql .NET provider is GPL-ed. This means that if you compile YOUR code against that .NET provider, your code has to be GPL-ed as well. I'm not sure you do that Paul, but if you do, please be aware that their lawyers are very keen on this and it was the reason I opted for a commercial .NET provider for MySql (corelab)

  • Frans: Thanks for that info -- another reason why I do NOT compile my O/R mapper against ANY 3rd party providers! I simply allow my users to specify their own drivers, which nicely avoids those issues, while also letting users choose what works best for them.

Comments have been disabled for this content.