views:

22

answers:

1

I has encountered conversion from integer to string with MySql+SubSonic3 (it generates wrong SQL query). After I found root of 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?

+1  A: 

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

Rob Conery
I think it should be CHAR(200) then, CONVERT() in MySql doesn't accept VARCHAR type.
Nickname