Subsonic 3: Invalid cast from ‘System.Byte’ to ‘System.Byte[]’

subsonicsubsonic3

I'm trying to use Subsonic 3.0 but with every query I try it gives me this error:

"Invalid cast from 'System.Byte' to 'System.Byte[]'."

I've tried using linq and activerecord on several different tables and always having this problem.

Just to make sure, here is a code snipped that throws the error:
LiteralContent.Text = DB.Teksten.SingleOrDefault(t => t.ID == Convert.ToInt32(TextID)).Tekst;

Also try to debug into the error but couldn't find the exact source of the error while stepping through it.

Best Answer

Just found the solution. A user already reported this bug 33 weeks ago and posted a fix at: http://blog.wekeroad.com/subsonic/subsonic-3-0-repository-template-update/

Has to do with generation of tinyint datatype.

Related Topic