Saturday, February 12, 2005

Inspired by Joe Audette's presentation at the Nashville .NET Users Group meeting last night, I've been on a mission to learn more about MySQL.  I downloaded the database server, administrator, query browser and the .NET data provider "MySQL Connector/Net" (formally ByteFX, I believe).  After installing all the goodies, I fired up MySQL Administrator and created a new database ...er... schema, and added a couple of tables.

Setting up a "hello world" test was a breeze.  MySql.Data.MySqlClient includes a MySqlHelper class, which is equivalent to the SqlHelper class found in the Microsoft Application Blocks for Data (now in the Enterprise Library).  Within just a few lines of code, I had a DataGrid populated from my new database...uh...schema.

string cnnString = "Server=localhost;Port=3306;Database=mydb;Uid=myusr;Pwd=mypwd";
MySqlConnection cnx = new MySqlConnection(cnnString);
cnx.Open();

DataSet ds = MySqlHelper.ExecuteDataset(cnx, "SELECT * FROM favorite");
dgFavorite.DataSource = ds;
dgFavorite.DataBind();

But, I didn't stop there.  Oh, no.  My new mission was to see if I could get Paul Wilson's ORMapper to talk to MySQL.  It took some Googling and a couple of good resources, but I was eventually able to do it.

// Retrieve a single object using GetObject()
Favorite fav = (Favorite) DataManager.ObjectSpace.GetObject(typeof(Favorite), 1);
lblResults.Text = "Retrieved Favorite: " + fav.Text;

// Retrieve all objects using Paul Welter's RetrieveAll() static method
dgFavorite2.DataSource = Favorite.RetrieveAll();
dgFavorite2.DataBind();

Of course, there are a lot of details I'm leaving out.  I may use this experience as a starting point for a tutorial or two for my "Learn ASP.NET" section.

By the way, I'm using Paul Welter's latest CodeSmith templates for the ORMapper, which automatically sets up static methods on the generated entity classes such as Retrieve(), RetrieveAll(), RetrievePage(), RetrieveQuery(), Save() and Delete().  Very cool.

What a rush... this is why I became a developer.

Saturday, February 12, 2005 1:09:00 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [9]  | 
 Friday, February 11, 2005

Today's Dilbert just cracked me up.  That's me holding my Windows Mobile 2003 phone.  Wait... maybe this is too true to be funny...

Friday, February 11, 2005 8:48:00 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  | 

The most frequent question I'm asked about hosting at ChristianASP.NET is database support.  I love Microsoft SQL Server and have used it for years.  (Since version 4.2!)  Obviously, I can't afford what it would take to license SQL Server in a hosted environment.  I have a few users who are using Access or MSDE.  I know that MySQL and PostgreSQL may be viable solutions, but I've never used them.  I know absolutely nothing about setting them up, or hosting them so that they would be secure and properly maintained. 

Anyone have experience with either MySQL or PostgreSQL?  Any advice or resources you'd recommend?

Friday, February 11, 2005 8:43:00 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [4]  | 
 Wednesday, February 09, 2005

If you use .Text, you may want to check out Joey's new Watercolor skins

Wednesday, February 09, 2005 3:20:00 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  | 

When GoDaddy.com's ad came on during the SuperBowl, my wife turned to me and asked, "Isn't that the company you use?"

"Unfortunately," I replied.

I've purposefully waited to talk about this.  I'm still not sure exactly what to say, other than I'm extremely disappointed.  Betrayal might be a better word to use.  Because of Bob Parson, GoDaddy.com's owner, and his association with QuickVerse (Bob started Parson's Technology), I felt confident I'd been dealing with a company that would have the utmost integrity.  Apparently, I was wrong.

GoDaddy.com has received a lot of publicity over this, so I suppose they feel like their ad was an enormous success.  To the rest of the world, it may seem like this was a brilliant marketing strategy.  I think it's a disgrace.

My apologies to those of you who have registered domains at GoDaddy.com based on my recommendation.

Wednesday, February 09, 2005 1:56:00 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [5]  | 
 Tuesday, February 08, 2005

I've renamed the "Articles" section to "Learn ASP.NET," and created a new page named Online Resources for listing recommended links.  It's far from comprehensive, and I haven't finished going through my bookmarks.  Please post your favorite sites and articles. 

Also, I plan to add a group of links for e-Ministry.  I've seen a couple, like Church Marketing Sucks and Online Evangelism, and there are some great blogs I've discovered recently.  Know of any others?

Tuesday, February 08, 2005 9:58:00 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [6]  | 

This is one of the coolest things I have seen in a while... Google Maps.

Tuesday, February 08, 2005 10:08:00 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  | 
 Monday, February 07, 2005
Scott Mitchell believes that Visual Studio 2005 Beta 2 will ship with a "Go Live" license.  When that I happens, I would like to begin setting up some test sites for ASP.NET 2.0.  Let me know if you're interested.
Monday, February 07, 2005 7:13:00 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  | 
I had a hard enough time giving away the last 10.  Now Gmail has given me 50 invites!  If I don't get any requests for an invite, I may give them all to the Gmail Invite Spooler.
Monday, February 07, 2005 1:48:00 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  | 
I've created a new section on the Web site for articles and tutorials that I plan to write.  My first article is just a list of recommended free tools and components for ASP.NET.  Let me know what your favorite free tools are, so I can check them out and add them to the list!
Monday, February 07, 2005 1:02:00 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [3]  | 
 Wednesday, February 02, 2005

From James Shaw's blog at www.coveryourasp.net. Here's the time where I'm at (near Nashville, TN).

Oh, and speaking of James Shaw, go check out www.dozingdogs.com.  It's an awesome content management system for ASP.NET, based on what I've seen so far.  Sorry, James... I still haven't got around to doing a full review.  I haven't forgotten!

Wednesday, February 02, 2005 2:08:00 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  | 
 Saturday, January 29, 2005

The latest evolution of ComponentArt's fantastic suite of ASP.NET controls was released this week.  2.1 includes three new controls: TabStrip, MultiPage and SiteMap.  As always, they have continued to improve their other controls: Menu, TreeView, NavBar, Rotator and Snap.

Get the ComponentArt 2.1 download.

Saturday, January 29, 2005 2:29:00 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  | 
 Monday, January 17, 2005

This past weekend I worked on one of the most bizarre "tech support" issues I have ever encountered.  A friend of the family recently upgraded from dial-up-networking to DSL.  From his main workstation, he had been experiencing a problem where he could not post a form on any Web site.  He could browse or download, but submitting a form, such as logging in to his web-based e-mail account or completing a contact form, would not work.  The browser would simply "hang" and never complete the action.  Now begins the troubleshooting steps.

  1. Does the same problem occur in other browsers?  Yes.  Internet Explorer, Netscape, Opera and Mozilla Firefox all exhibit the same problem.
  2. Does the same problem occur on other computers on the network?  No.  Other computers on the network have no problem at all submitting forms, signing in to web-based e-mail, etc.

At this point, I'm thinking the problem must be spyware or some other Internet component that has injected itself somewhere in the TCP/IP pipeline.  However, every anti-spyware and anti-virus utility reports the system is clean.  I try removing every bit of software on the PC that might use the Internet for any reason.  I clear the Startup, Run, RunOnce, stop services... nothing I try fixes the problem.

Okay... only thing left is to format and rebuild.  The computer is running Windows 2000 Pro, and we've already talked about upgrading it to XP Pro SP2.  So, I back everything up -- twice.  Some things I actually back up three times.

Format.  Load Windows XP SP2.  Open Internet Explorer...

SAME PROBLEM.

What is going on here?!

At this point I'm thinking, as bizarre as it may sound, the problem must be in the network card or cable.  We don't have an extra cable or card lying around, so we decide to break for a road trip and grab some dinner.  An hour later we're back with our bag of goodies.

Does changing the cable fix the problem?  Nope.

Does changing the network card fix the problem?  Nope.

The only thing left is the Linksys DSL/cable router.  Since the other computers on the network don't have a problem, I try switching ports.  Still doesn't work.  Now I try bypassing the Linksys router and go directly to the DSL modem.  Guess what?

IT WORKS!

However, my problems aren't over.  I go to the Linksys web site and, of course, there is a firmware upgrade for the BEFSX41.  Unfortunately, I can't download it.  I go to another computer.  I can't download it there, either.  I start searching the Internet and discover (along with quite a few colorful comments on what users think of Linksys) that no one else can download the upgrade, either.  Finally, I find a kind soul has posted a good link to the firmware upgrade hosted somewhere other than Linksys.  I download, apply the upgrade, and...

IT WORKS!

Now, how do you explain that?  What could have been going on with the router that prevented that particular computer from submitting a form??

"When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth." -- Sherlock Holmes

Monday, January 17, 2005 3:50:00 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [1]  |