Thursday, December 29, 2005
MySQL Schema Provider version 0.91 includes new support for Extended Properties CS_IsIdentity and a bug fix for GetTableData().

MySQL auto_increment doesn't work exactly like SQL Server's IDENTITY. I believe that auto_increment is equivalent to IDENTITY(1, 1). However, auto_increment behaves differently from IDENTITY when used with multi-column primary keys.  See the MySQL Reference Manual for details.

Note: I compiled this against CodeSmith version 3.1.6, so you may need 3.1.6 (or later), or recompile the provider if you are on a previous version of 3.x.

Download version 0.91
Thursday, December 29, 2005 10:19:00 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  | 
 Sunday, December 25, 2005
I would like to wish you, wherever you are, a very Merry Christmas!  May God bless you and your loved ones.
There were sheepherders camping in the neighborhood. They had set night watches over their sheep. Suddenly, God's angel stood among them and God's glory blazed around them. They were terrified. The angel said, "Don't be afraid. I'm here to announce a great and joyful event that is meant for everybody, worldwide: A Savior has just been born in David's town, a Savior who is Messiah and Master. This is what you're to look for: a baby wrapped in a blanket and lying in a manger."

At once the angel was joined by a huge angelic choir singing God's praises:
Glory to God in the heavenly heights,
Peace to all men and women on earth who please him.
As the angel choir withdrew into heaven, the sheepherders talked it over. "Let's get over to Bethlehem as fast as we can and see for ourselves what God has revealed to us." They left, running, and found Mary and Joseph, and the baby lying in the manger. Seeing was believing. They told everyone they met what the angels had said about this child. All who heard the sheepherders were impressed.

Mary kept all these things to herself, holding them dear, deep within herself. The sheepherders returned and let loose, glorifying and praising God for everything they had heard and seen. It turned out exactly the way they'd been told!

-- Luke 2:8-20, The Message
Sunday, December 25, 2005 10:45:00 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  | 
 Sunday, November 27, 2005
While recuperating from massive quantities of turkey and trimmings, I began work on a CodeSmith custom schema provider for MySQL 5.0

As Josh frequently says, “Nerd alert! Nerd alert!”

The journey has been quite a learning experience so far.  Creating a custom schema provider requires that you create a class that implements the IDbSchemaProvider interface.  This interface exposes a couple of properties and several methods required to query definitions for all tables, views, stored procedures, keys, indexes, and so forth.  Since I’m targeting MySQL 5.0, I’m using the new INFORMATION_SCHEMA support wherever possible.  The provider also depends on the latest MySQL Connector/Net.

Download ChristianASPNet.MySQLSchemaProvider version 0.90

Instructions:
  • Make sure you have MySQL Connector/Net 1.0.7 or later installed
  • Make sure CodeSmith is not running
  • Extract and copy the ChristianASPNet.MySQLSchemaProvider.dll assembly to /Program Files/CodeSmith/v3.0/SchemaProviders (or wherever you have CodeSmith installed)
The next time you run CodeSmith and create or modify a data source, MySQLSchemaProvider should now show up in the list of available Provider Types.

UPDATE (12/23/05):
Apparently you will need CodeSmith version 3.1.4 or later to use the assembly in the download.  You may be able to use a previous version of CodeSmith 3.xx if you compile the source yourself.  Also, be sure to use the following format for your MySQL provider connection string.

Server=localhost;Port=3306;Database=databaseName;Uid=userName;Pwd=userPassword

UPDATE (12/29/05): Download the latest version 0.91.

For more nerdy details, read on...

I’ve also included a simple SchemaTest.cst template that I created as I was writing the custom provider.  It doesn’t do anything special or even demonstrate best practices.  It’s just an ugly test harness. I include it in case you are interested in having a quick way to query the objects in your MySQL database.

There are a few methods I have not been able to implement (yet).  GetCommandParameters() returns parameter definitions for a given stored procedure.  MySQL 5.0 INFORMATION_SCHEMA does not support the PARAMETERS table at this time.  I tried to use MySQL Connector/Net’s MySqlCommandBuilder.DeriveParameters() method, which is supposed to work in version 1.0.7, but threw a NULL reference exception in my testing.

GetCommandResultSchemas() returns the schema of the result sets that are output from a given stored procedure.  However, if the stored procedure requires parameters, then we’re back to the previous issue.

I also chose not to implement GetExtendedProperties(), since I don’t yet know what would be relevant to a MySQL developer.  I am a MySQL newbie, after all.

Happy templating!
Sunday, November 27, 2005 11:50:00 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [2]  | 
 Monday, November 21, 2005
New version 1.0.7 of the MySQL ADO.NET provider Connector/Net has been released.  From the press release:

MySQL Connector/Net 1.0.7, a new version of the fully-managed, ADO.Net provider for the MySQL database system has been released. This release is the latest production release of the 1.0 series and is suitable for use with any MySQL version including MySQL 4.1 or 5.0.
Continue...

The new version includes binaries for .NET 2.0, but they are simply compiles of the existing source code and do not take advantage of any new ADO.NET 2.0 features.

Download Connector/Net
Monday, November 21, 2005 1:05:00 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  | 

I've mentioned before about forwarding e-mail to Google GMail.  Here's a summary of the benefits and features.

  • Backup of all e-mail
  • Online, accessible from any computer with an Internet connection
  • Simple, easy-to-use interface
  • Searching for old e-mail is a snap
  • Spam filtering
  • POP3 access, so you can use any e-mail client (Outlook, Thunderbird, Eudora, etc.)
  • You can customize the Reply-To address so that other people never have to know you're using GMail.  Replies will still be sent to your regular address instead of GMail.
  • Over 2,600 MB of storage (as of today) and growing

I know there are many of my customers who could benefit from using GMail just for the spam filtering alone.  I used to provide spam filtering with my hosting, but it became too much of a hassle.  It only takes about 5 seconds for me to modify an account to start forwarding all e-mail to another address.

If you're one of the few people on the planet who doesn't already have a GMail account, let me know and I'll send you an invitation.

Monday, November 21, 2005 12:18:00 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [1]  | 
 Friday, November 18, 2005

One of the guys here at work was asking for a utility that would quickly show the size of each folder on his disk.  Josh did a search and came up with Folder Size for Windows.  This utility integrates with Windows Explorer and gives you more options (columns) when viewing the file system in Details view.  New columns that you can add to your display include:

  • Folder Size
  • Folder Size Sort (same as Folder Size but formatted to sort properly)
  • File Count
  • Folder Count
  • Sibling Count

Sizes are cached and updated automatically as things change on your system.  Plenty of other features to enhance performance.

Friday, November 18, 2005 8:56:00 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [1]  | 
 Monday, November 14, 2005
Seth Godin (the bald marketing guru that writes about purple cows) has posted his take on Google Analytics, which is supposed to be a free web site tracking/analysis tool hosted by Google.  The site is currently undergoing some kind of "maintenance" so I haven't been able to check it out for myself yet.  More info here.  Very interesting... 
Monday, November 14, 2005 12:14:00 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  | 
 Saturday, November 12, 2005
Perhaps a bit overdue, but I've added an About page to the site.  I've even included a few pictures.  Uh... enjoy... I guess.
Saturday, November 12, 2005 11:39:00 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [2]  | 

Part 2 in the MySQL series is now up.  This article is an introduction to MySQL stored procedures including the benefits of using stored procedures, creating stored procedures using MySQL Query Analyzer, and executing stored procedures from ASP.NET. 

Comments certainly welcome and appreciated!

Saturday, November 12, 2005 2:25:00 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |