views:

287

answers:

3

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.

+1  A: 

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.

Yannick Smits
+1  A: 

I fixed this error today with the release of 3.0.0.1 (I hope): http://blog.wekeroad.com/subsonic/subsonic-3-0-0-1-released/

Rob Conery
i checked the new download but it seems it hasn't been fixed.
Yannick Smits
A: 

I just downloaded 3.0.0.1 and it's not fixed also check this one

link text

I have included the fix

freddoo