Friday, August 29, 2008
C# and MySQL.
Ok I admit that I have been holding off on looking into using mysql with C# because for some strange reason, I thought it was going to ultra complicated. Well a recent project demanded that I figure it out so after a quick search I came accross MySQL Connect.net on dev.mysql.com. After a quick read through the documentation, I was able to establish a connection and get all of the database names in about 30 minutes and after about an hour or so, I had a pretty nice class starting to form. I realized quickly though that I couldn't treat data the same in C# as I would in php since php is typeless. With a bit of thinking and playing with the code, I figured out how to check the data type of each field, compare it to C#'s internal type names and store the data to an array accordingly. After I add some more to the class, I'll be putting it on source forge.
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment