Subsonic 3:来自“System.Byte”的无效转换 到“System.Byte[]”
我正在尝试使用 Subsonic 3.0,但每次尝试查询时都会出现以下错误:
“从‘System.Byte’到‘System.Byte[]’的转换无效。”
我尝试在几个不同的表上使用 linq 和 activerecord,但总是遇到这个问题。
只是为了确保,这里有一个抛出错误的代码片段: LiteralContent.Text = DB.Teksten.SingleOrDefault(t => t.ID == Convert.ToInt32(TextID)).Tekst;
还尝试调试错误,但在单步调试时无法找到错误的确切来源。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
刚刚找到解决方案。 一位用户已在 33 周前报告了此错误,并在以下位置发布了修复程序:
http://blog.wekeroad.com/subsonic/subsonic -3-0-repository-template-update/
与tinyint数据类型的生成有关。
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.
我今天在发布 3.0.0.1 时修复了这个错误(我希望如此):
http://blog.wekeroad.com/subsonic/subsonic -3-0-0-1-发布/
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/
我刚刚下载了 3.0.0.1,它还没有修复,请检查这个
链接文本
我已包含修复程序
I just downloaded 3.0.0.1 and it's not fixed also check this one
link text
I have included the fix