//把數(shù)據(jù)填充到dataGrid控件中,并返回該數(shù)據(jù)///////////////////////??????? public static DataSet FillDataGrid(string sql, string dname, System.Windows.Forms.DataGrid dg)??????? {??????????? if (oleConnection1 == null)??????????? {??????????????? oleConnection1 = new OleDbConnection(LiCai.database.dbConnection.connection);??????????????? oleConnection1.Open();??????????? }??????????? Console.WriteLine(sql);??????????? OleDbDataAdapter adapter = new OleDbDataAdapter(sql, oleConnection1);??????????? DataSet ds = new DataSet(dname);??????????? adapter.Fill(ds,dname);? //這一句運(yùn)行程序時(shí)出現(xiàn)了錯(cuò)誤,不知道怎么解決。錯(cuò)誤信息放在下面。??????????? dg.SetDataBinding(ds,dname);??????????? return ds;??????? }【System.Data.OleDb.OleDbException:“日期的語(yǔ)法錯(cuò)誤 在查詢表達(dá)式 'inDate between #2017-12# and #2017-13#' 中?!薄窟@是提示的錯(cuò)誤信息,日期的設(shè)置不對(duì),可是不知道應(yīng)該怎么把后面的2017-13修改掉。求助!感激不盡!
【C# System.Data.OleDb.OleDbException 日期的語(yǔ)法錯(cuò)誤 】麻煩各位高手幫忙看看。
入夢(mèng)時(shí)節(jié)
2017-12-21 21:54:18