2
這是我有問題的查詢:如何只在ms訪問中插入時間?
cmd = new OleDbCommand(insert into tbl_Customer(cReportingTime) values (@ReportingTime)", con);
cmd.Parameters.Add("@ReportingTime", OleDbType.DBTime).Value = Time;
cmd.ExecuteNonQuery();
當我嘗試運行它,我得到這個錯誤:
"Failed to convert parameter value from a DateTime to a TimeSpan"
我想不過只插入時間在MS Access數據庫I似乎無法得到它的工作。
可能重複的[Convert DateTime to TimeSpan](http://stackoverflow.com/questions/17959440/convert-datetime-to-timespan) – fk2
@ fk2它可能是但我還沒有找到該問題的答案我已經看到了,我很困惑在哪裏寫Timeofday屬性。沒有想法 – Elixir