Thursday, May 31, 2007

New version of Windows Live Writer

You can see the announcement here.  Some pretty nice new features but what I love is the very non-intrusive install experience.  This team continues to do great work and it looks like it's carried over to Windows Live Mail.

Wednesday, May 30, 2007

Interim builds available for Connector/Net 5.1

We are happy to announce that we have now enabled interim snapshots for Connector/Net 5.1.  It can be found at

These will not currently update nightly.  In the future, we hope to enable nightly uploads of snapshots.  In the meantime, please take care when using these builds.  They are snapshots directly out of our development trees and are not guaranteed to function at all.  They are intended simply to give users and customers an advance look at what is coming in future released versions.

Can't kick the habit, huh?

Anyone else think it's funny that MS used flash for their Surface website and not Silverlight?   :)

Wednesday, May 23, 2007

MySQL Connector/Net 5.1.1 has been released


MySQL Connector/Net 5.1.1 a new version of the all-managed .NET driver for MySQL has been released.

This is a big release and represents a change in how we package our products. Until now, we've shipped our core provider and the Visual Studio integration bits as separate downloads. This has become a bit of a problem. Often we would fix a bug that involved changing code both in the VS package and in the core provider. This provided a versioning problem where users would need to upgrade both products to see the benefit of the bug fix. To solve this, we've decided to discontinue Tools for Visual Studio as a separate product and have, instead, integrated it into a new Connector/Net installer. We hope this provides a better "out of box" experience for our users.

All previous versions of Tools for Visual Studio should be uninstalled prior to installing this product.

Version 5.1.1 works with all versions of MySQL including MySQL-4.1, MySQL-5.0, MySQL-5.1 beta or the MySQL-6.0 Falcon "Preview". Please be aware though that this version is alpha quality software and should not be used in production environments.

It is now available in source and binary form from [] and mirror sites (note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site.)

Bugs fixed:

  • Fixed password property on MySqlConnectionStringBuilder to use PasswordPropertyText attribute. This causes dots to show instead of actual password text.
  • Fixed problem with pooling on the compact framework. It should work now.
  • Install now calls VS setup only when VS integration is selected. (bug #28260)
  • MySqlRoleProvider.GetRolesForUser now works correctly (bug #28251)
  • Installer now adds a default connection string to machine.config. This will prevent errors related to a missing connection string. You will need to override this value in your web.config files.
  • Changed installer to only give option to install Visual Studio integration if Visual Studio 8 is installed

(Bugs fixed in 5.0.7 that are now appearing in 5.1.1)

  • Bug #27765 Logging does not work
  • Bug #27679 MySqlCommandBuilder.DeriveParameters ignores UNSIGNED flag
  • Bug #27668 FillSchema and Stored Proc with an out parameter
  • Bug #28167 Poor performance building connection string (thanks Maxim!)
  • Bug #26041 Connection Protocol Property Error in PropertyGrid Control
  • Bug #26754 EnlistTransaction throws false MySqlExeption "Already enlisted"
  • Bug #23342 Incorrect parsing of Datetime object for MySQL versions below 4.1


Where to get information.

.NET forum: []
.NET mailing list: []
Reggie's blog: []
Planet MySQL: []

As always we thank you for your use of our products and keep those bug reports coming!

Friday, May 18, 2007

This will be huge

It's not new (Yahoo! Pipes is already there) but the Visual Studio integration is the kicker.  Check it out:

Connector/Net 5.0.7 has been released


MySQL Connector/Net 5.0.7 a new version of the all-managed .NET driver for MySQL has been released.

This is a bug fix release for the current production branch of Connector/Net.

Version 5.0.7 is suitable for use with any MySQL version including MySQL-4.1, MySQL-5.0, MySQL-5.1 beta or the MySQL-6.0 Falcon "Preview".

It is now available in source and binary form from the Connector/Net download pages at and mirror sites (note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site.)

Bugs fixed

  • Bug #27269 MySqlConnection.Clone does not mimic SqlConnection.Clone behavior
  • Bug #27289 Transaction is not rolledback when connection close
  • Bug #26147 "User Id" problem during connection creation
  • Bug #27240 Property value characterset not retrieved/fetched in conn wizard
  • Bug #25947 CreateFormat/CreateParameters Column of DataTypes collection incorrect for CHAR
  • Bug #27765 Logging does not work
  • Bug #27679 MySqlCommandBuilder.DeriveParameters ignores UNSIGNED flag
  • Bug #27668 FillSchema and Stored Proc with an out parameter
  • Bug #28167 Poor performance building connection string (thanks Maxim!)
  • Bug #26041 Connection Protocol Property Error in PropertyGrid Control
  • Bug #26754 EnlistTransaction throws false MySqlExeption "Already enlisted"
  • Bug #23342 Incorrect parsing of Datetime object for MySQL versions below 4.1

Other changes

  • Installer now works if XML comments are found in machine.config
  • GetSchema will now attempt to unquote identifiers passed in as restrictions
  • The MySqlCommand object now properly clones the CommandType and CommandTimeout properties

Thanks for trying out this release.



Friday, May 11, 2007

DbConnectionStringBuilder and the property grid control

This may be obvious to some but it wasn't to me so I thought I'd write about it.  Recently I discovered a problem with our implementation of DbConnectionStringBuilder.  Whenever you changed a field that took a string (i.e. character set or server), the connection string property would not update.  I know the changes were applied because I developed a test application that queried the connection string.  It was correct even though the UI of the property grid was not. 

After an embarrassingly long time working on this I emailed a friend of mine who I felt would know the answer.  Turns out he didn't but he knew someone who did and not more than 30 minutes after talking with him I had my answer.  Each property of MySqlConnectionStringBuilder needs to be decorated with the RefreshPropertiesAttribute.  This causes the property grid to refresh itself when they change.

Retrieving autoincrement field values

Often people ask me how to retrieve the value of an autoincrement column when they are using the MySqlCommandBuilder object.  Generally this is done by appending something like ";SELECT last_insert_id()" onto the generated insert command text.  Command builder objects usually provide some type of syntax where a user can indicate that they want this to be done.  Connector/Net 1.0 had some syntax for this but starting with Connector/Net 5.0 that all changed. 

With the new ADO.Net 2.0 API, Microsoft did not directly provide for any type of API that users could use for selecting this.  With ADO.Net 2.0, there are two things that need to happen.  First, a SELECT statement similar to above must be attached to the INSERT command.  Second, the command object must have its UpdatedRowSource property set to Both or FirstReturnedRecord.  What this does is tell the data adapter update engine to take the first returned row and merge it's values back into the changed row.  So, if the first returned row is the result of a 'SELECT last_insert_id()', then the generated key will be returned and merged back in.  Good, huh?

Not so fast.  The UpdatedRowSource property exists on the command object.  The whole point of using MySqlCommandBuilder is to not mess with command objects.  Everything should be handled automatically with as little code as possible.  To this end, we've added a custom property to MySqlCommandBuilder called ReturnGeneratedIdentifiers.  By setting this property to true, the proper select statement will be included and the generated command object will have its UpdatedRowSource property set.

Saturday, May 5, 2007

VMWare 6 rocks

So I've been using Virtual PC 2007 since it was released but was always frustrated with its inferior Linux support.  I don't really understand why Microsoft drags their feet on this.  With more and more devs moving to vm only development, it's getting easier and easier to change your host platform and still development for Windows.  I'm sure Microsoft would much rather you run Windows as your host platform and run Linux in a vm when you need.   I've tried VMWare Server but since I run Vista x64 as my host, that's more pain than I really like.

Enter VMWare 6.  Sure it installs and runs on Vista x64 like a champ and performance seems great but what really blew me away was the multi-monitor support.  I've been using twin 19" monitors for nearly 2 years now and I simply can't imagine life without them.  Folks I kid you not.  It was easier to get Ubuntu running on two monitors using VMWare 6 than it was running on my actual hardware.  I installed Feisty Fawn and then followed that up by installing the VMWare tools  (which installed without a hitch).  At the final stage of the VMWare tools install, it asks me what resolution I want to use.  I gave it a reasonable response, finished with VMWare tools, and then logged off so I could restart X.  Bam, the screen jumped to some huge resolution.  Something like 3000x2000.  I hit the maximize button on the VMWare screen and the Ubuntu desktop neatly filled both my monitors.  No editing of any x config files.  No Windows desktop elements visible.  No Windows taskbar.  Nothing.  Sweetness.

Multi-monitor support is not supported in Windows Server 2003 but XP works like a champ.  VMWare 6 puts me a little bit closer to vm only development.

Thursday, May 3, 2007

Thanks Jeffrey!

We just finished up our 2007 Users Conference and I'd really like to thank David Sceppa and Jeffrey McManus for presenting at the conference.  David is a program manager on the ADO.Net team at Microsoft and I had more than one person come up to me and tell me that having a Microsoft rep at the sessions really indicated that we were serious about working with Microsoft tools and that Microsoft seemed very willing to help with that.  True indeed.

Also, I really appreciated Jeffrey being willing to jump in last minute and do a presentation for us.  He does alot of traveling and presenting so I know his time is precious.  Jeffrey also recently made available a tool he wrote for generating a set of classes for a given database schema.  He calls it Cgen and you can read his announcement about it here.  Keep up the good work, Jeffrey, and thanks!

MiX sessions online

Didn't make MiX '07?  Neither did I.  That's ok, though, cause the sessions are all online here.  Alot of great content here.  I'm listening to a session talking about PHP on Windows.  Gotta get back....

Wednesday, May 2, 2007

Checking out KDE4

So I decided to download the KDE4 live preview ISO and see what those guys  have been up to.  First pass was through Virtual PC 2007.  It initially seemed to boot ok but I eventually landed on a blank screen which didn't budge for nearly 45 minutes.  Either it was dead or taking an ridiculously long time.  Scratch.

Next I tried VMWare 6 RC1 and found success.  The image booted up nicely (although a bit slowly) and I was left with a very blank KDE4 desktop.  Very blank.  No demos.  Nothing to show me what is new.  Just a pretty blue screen.  Opening up the link for my home folder, I got a very bad looking type of explorer window that had tabs for history, services, network, etc.  At this point I was  unimpressed and bored. 

Is it just me or is the Linux desktop crowd still trying to reproduce what the Mac and Windows folks had about 5 years ago? 

The issue with FillSchema

Connector/Net's MySqlDataAdapter class has a method named FillSchema.  This method is intended to populate the metadata for a given query without actually returning any of the data from the query.  The only syntax that MySQL has to help with this is SQL_SELECT_LIMIT which limits the number of rows that are returned for a given select.  Indeed this is what we are using to prevent the transfer of data across the wire when we only want the metadata.

However, there is a problem.  SQL_SELECT_LIMIT does not work in stored procedures and also does not affect inserts, updates, or deletes.  So, the upshot of this is that calling FillSchema on a stored procedure will, in fact, execute the stored procedure and return all of the data to the client.  This is a waste of bandwidth but it's worse than that.  It will also execute all other DML statements in the procedure.

This is different than what happens with SQL Server and different than what people might expect.  With SQL Server, a 'SET FMTONLY ON' set statement is sent to the server prior to the command.  This prevents all DML from being executed and will return only metadata for any selects.  MySQL has no such mechanism. 

The thing to remember is that FillSchema will execute the procedure exactly the same as if Fill had been called with only one difference.  INOUT and OUT parameters will not have their values set properly on return.

Using the new Connector/Net Web providers

Yesterday I blogged about the release of our latest Connector/Net product.  Version 5.1, this release includes the addition of a new namespace MySql.Web.  This namespace includes implementations of a Membership and Role provider.  These providers work together with the membership and role systems in ASP.Net 2.0 to provide a simple mechanism for web developers to add authentication and role support to their web properties.

As we were unable to include proper documentation for these new providers before release, I thought it proper to write down a few thoughts on how these work and how to use them.

1. Provide a connection string

The Connector/Net installer will register the providers in the proper sections of the machine.config file.  When registered, they reference a connection string that is non-existent.  To use the providers, you must provide a connection string that points to the database you wish to use and must be named 'LocalMySqlServer'.   You would provide this connection string in your web.config file.  Here is an example:


<add name="LocalMySqlServer" connectionString="data source=localhost;uid=root;pooling=false" providerName="MySql.Data.MySqlClient" />


You can also use the Web Configuration Pages in Visual Studio to select the MySQL Membership and Role providers as defaults for your application.  Once this is done, controls such as the Login control will work with MySQL.

2. Understand how the schema is handled

We wanted the providers to work with shared hosting environments where only a single database may be available.  To do this, the providers can create or update the necessary schema at runtime.  This is handled at initialization time.  The provider checks the version of the schema in the selected database.  If non-existent, then the appropriate schema is created.  If older than current, it will be updated to match what this provider is wanting.

There is a possibility of name collision since your tables and the tables for the providers exist in the same database.  This is unlikely, though, since the names given to the provider tables are somewhat unique to their purpose.

We're working on better documentation for these providers and plan to make that available with the 5.1.1 release.  Also, we plan to create some articles for our dev zone that will demonstrate how to use these providers.

Tuesday, May 1, 2007

Where have I been?

I guess I've not been paying attention but I just learned that JetBlue is based entirely on Microsoft and .NET technologies.  You can read some about it here.  Jackie seemed to like it.  A friend of mine flew JetBlue to the MySQL users conference and had nothing but good things to say about them.  I find it interesting that we hear that companies need to move to Linux to save money and yet here we have one of the low-cost leaders offering world class service on *gasp* Microsoft software.  Maybe, just maybe, the bulk of costs incurred by a company are not related to licensing.  Nahhh......

Connector/Net 5.1.0 Alpha has been released.

Today we've announced the availability of Connector/Net 5.1.0 Alpha.  This is a very exciting release for us as it's the first time we've made available our ASP.Net 2.0 web providers and our compact framework support.  This release also folds in our Tools for Visual Studio into a single installer. 

To that end, we are dropping Tools for Visual Studio as as separate download.  Going forward, you can select Visual Studio integration as an option directly from the Connector/Net installer.  All the same functionality is there, but packaging the products in this way will simplify bug fixes to the products and give our users a better out of box experience.

We encourage anyone using our products to try out this latest release and let us know what you think.  You can read our official release announcement here.

Entity Framework cut. Positive sign?

Microsoft recently announced that they are removing the Entity Framework and tools from Visual Studio "Orcas" and will, instead, ship them as an update in the first half of 2008.  It's pretty easy to see this as YAMM (Yet Another Microsoft Miss) but I instead look at this as a very positive sign of things changing.

Microsoft is accelerating many of the development timelines and embracing the "release early, release often" methodology.  It seems that almost every Microsoft product these days comes out as a CTP about a million times even before it his beta stage.  This just means greater awareness and better adoption.  MS is even releasing alot more code as open source as they recently announced a Dynamic Language Runtime (DLR) that supports languages such as Python and Ruby.  They are releasing it under a BSD style license.

It's clear that Orcas was going to be ready long before the Entity Framework and, rather than hold it up for another 6-9 months, they decided to ship Orcas and bolt on the EF later.  This is a good move and indicates that MS is wanting to speed up release cycles all across their divisions.  Let's hope this trend continues.