Category Archives: Mono

DataTable() Fix in Mono 4.0

If you recently upgraded to Mono 4.0 and you use DataTables to return SQL results (in my case from Postgresql), you may have received a heart attack similar to mine when you were bombarded with the error:

SourceTable is required to be a non-empty string

This appears to be related to Bug #29557: https://bugzilla.xamarin.com/show_bug.cgi?id=29557

Thought .Net is perfectly happy allow

DataTable whatever = new DataTable();

Mono will throw an exception.
It is looking for you to name the data table.

To fix, simply change

DataTable whatever = new DataTable();

to

DataTable whatever = new DataTable("some_name");

Happy compiling!

Focus On Your Core Competencies

It’s something drilled into every MBA, day after day. It’s a simple mantra, but one easily forgotten as excitement around a project builds. I am always tempted to re-invent the wheel, just to see what kind of wheel I can come up with.

But, when you have a goal in mind, remember: you don’t need to roll your own JSON library, host your own Git repository, code a game engine from scratch. Keep it simple, and focus on what you do best.

PS: Also fight the urge to recode your Java app in C# because Visual Studio 2013 is all free now. Fight it. You can do it!

It couldn’t hurt to see how Mono runs in Centos these days though…