开发者

SubSonic Error with MySql CONVERT()

开发者 https://www.devze.com 2022-12-12 05:59 出处:网络
I has encountered conversion from integer to string with MySql+SubSonic3 (it generates wrong SQL query). After I found root o开发者_C百科f the problem in SubSonic sources and fixed it, everything work

I has encountered conversion from integer to string with MySql+SubSonic3 (it generates wrong SQL query). After I found root o开发者_C百科f the problem in SubSonic sources and fixed it, everything works fine, but I'm not sure that it won't pull some other stuff.

I believe in MySqlFormatter.cs the following code on line 309

                sb.Append("CONVERT(VARCHAR(MAX), ");
                this.Visit(m.Object);
                sb.Append(")");

must be replaced with

                sb.Append("CONVERT(");
                this.Visit(m.Object);
                sb.Append(", CHAR)");

Is it right?


Nice one! Yep - that should be VARCHAR(200) - change made and pushed. Thanks!

0

精彩评论

暂无评论...
验证码 换一张
取 消