方法:
public List getOrderByName(String aname,Date starTime,Date endTime){
String hql="from OrderModel orders where orders.aname=? and orders.outTime between ? and ?";
Object[] obj=new Object[3];
obj[0]=aname;
obj[1]=starTime;
obj[2]=endTime;
return beanDAOImpl.getListByHql(hql, obj);
}但是运行的时候却报这个错:com.microsoft.sqlserver.jdbc.SQLServerException: 传入的表格格式数据流(TDS)远程过程调用(RPC)协议流不正确。参数 5 (""): 提供的值不是数据类型 datetime 的有效实例。请检查源数据中的无效值。例如,小数位数大于精度的数值类型的数据即为无效值。这是什么原因?我用的是SSH结合框架。outTime 的类型的Date,但是数据库里的是datetime类型。
public List getOrderByName(String aname,Date starTime,Date endTime){
String hql="from OrderModel orders where orders.aname=? and orders.outTime between ? and ?";
Object[] obj=new Object[3];
obj[0]=aname;
obj[1]=starTime;
obj[2]=endTime;
return beanDAOImpl.getListByHql(hql, obj);
}但是运行的时候却报这个错:com.microsoft.sqlserver.jdbc.SQLServerException: 传入的表格格式数据流(TDS)远程过程调用(RPC)协议流不正确。参数 5 (""): 提供的值不是数据类型 datetime 的有效实例。请检查源数据中的无效值。例如,小数位数大于精度的数值类型的数据即为无效值。这是什么原因?我用的是SSH结合框架。outTime 的类型的Date,但是数据库里的是datetime类型。
能说说你的解决办法吗??