我在SQL中超出范围值时遇到问题,当我在C#Debug中运行它时。但选择与日期时间转换,直接在SQL中工作。我能做什么..?SQL超出C#中的值范围
WHERE (Edu_Table_1.chatardeba = CONVERT(DATETIME, '" + datesList[dd] + "', 103))
...
List<DateTime> datesList = new List<DateTime>();
DataTable dt1 = DataObjects.FetchFromDatabase(String.Format("SELECT date from dates_table", magalkurseli, examType), this.serverAddress, this.dbCatalog);
if (dt1 != null && dt1.Rows.Count > 0)
{
foreach (DataRow dr in dt1.Rows)
{
datesList.Add(Convert.ToDateTime(dr["tarigi"]));
}
}
什么日期时间值你想转换? – 2013-03-12 22:42:35
有没有机会让我们看看? – 2013-03-12 22:42:38
你可以发布代码,例如... – 2013-03-12 22:42:41