日期:2014-05-17 浏览次数:20939 次
string strsql = "INSERT INTO [urls]([Flag],[Url],[LastCheckTime])VALUES(@Flag,@Url,@LastCheckTime)"; OleDbParameter[] parameter = { new OleDbParameter("@Flag",OleDbType.VarChar,255), new OleDbParameter("@Url",OleDbType.VarChar,255), new OleDbParameter("@LastCheckTime",OleDbType.DBDate) }; parameter[0].Value = "lkf01"; parameter[1].Value = "http://www.w8le.com"; parameter[2].Value = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); //parameter[2].Value = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); DBHelper.ExecuteNonQuery(strsql, parameter);