Lesson of the Week: MySQL bits are bigger than expected in C#

Lesson of the Week:  MySQL bits are bigger than expected in C#

If you have a bit(1) in a MySQL table, guess what type it is converted to when you make a query using C#’s MySQL helper?

unsigned long

Yep, that’s right. The smallest possible type gets converted to the longest possible type when you make a query through c#. Not sure why this is, but it’s pretty strange.