//把數(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);? //這一句運行程序時出現(xiàn)了錯誤,不知道怎么解決。錯誤信息放在下面。??????????? dg.SetDataBinding(ds,dname);??????????? return ds;??????? }【System.Data.OleDb.OleDbException:“日期的語法錯誤 在查詢表達式 'inDate between #2017-12# and #2017-13#' 中?!薄窟@是提示的錯誤信息,日期的設(shè)置不對,可是不知道應(yīng)該怎么把后面的2017-13修改掉。求助!感激不盡!
- 1 回答
- 0 關(guān)注
- 1463 瀏覽
添加回答
舉報
0/150
提交
取消