日期:2014-05-18  浏览次数:20464 次

sql 服务器时间为什么不能放到 datareader中
省去数据源……
C# code
string cmdtime = "select getdate()";
            SqlCommand conntime = new SqlCommand(cmdtime,conn);
            SqlDataReader da = conntime.ExecuteReader();


------解决方案--------------------
你的数据库选的是2000的版本么?2000的版本我也遇到过类似问题,建议你定义一个变量,把得到的系统时间放在变量里,我当时是这么解决的
------解决方案--------------------
探讨

原来要用 datareader.read()