开发者

System.Byte[] can not be assigned to a property of type System.String setter

开发者 https://www.devze.com 2023-03-20 17:48 出处:网络
Hi i could not find the correct section to post this. But i am facing a serious problem working with MySQL and Nhibernate 2.1.2.4.0 named queries.

Hi i could not find the correct section to post this. But i am facing a serious problem working with MySQL and Nhibernate 2.1.2.4.0 named queries. I have written a stored procedure and i am calling it in C# using a flat class to map the database fields. My problem is it seems to work fine with Mysql 5.1 but 开发者_Go百科not with 5.0

I have a STRING property day_of_week in my class. But when i try to call the stored procedure it throws the following error :

The type System.Byte[] can not be assigned to a property of type System.String setter of "AssessmentFeedbackReportDTO.DayOfTheWeek" .

It works without any fuss in MySql v 5.1

Any help is much appreciated. Thanks in advance.


Try changing the stored procedure to convert charset to utf8 or other encoding - SELECT CONVERT(column USING utf8) FROM...

0

精彩评论

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

关注公众号