以前的一个项目中 写了一个webservices 。其中返回时间函数的时候调用的是date_FORMAT(时间,格式) 返回定义的时间。以前能够正常工作。这段时间由于服务器mysql数据库版本变化了(变化成了5.0.15)。突然一下 webservices中的时间都变成了base64编码。
早了很久的问题。测试的时候。 直接用select date_format(时间 ,格式) from 表,在c#客户端存入 data table 发现里面的类型是system.byte[];
而用其他数据库版本的时候。直接用select date_format(时间 ,格式) from 表,在c#客户端存入 data table 发现里面的类型是system.string;
诡异的问题。
最后修改方法 : select cast(date_format(时间,格式) , char(30) from 表
结果正确