Hey all,
Hope ye are all are enjoying christmas,
I was just wondering if someone could help me out I am having a small problem with insterting a Date into Access 2007. I am Using the Now() Function in VB.NET and have change the format to General date In Access 2007 so both formats seem to match.
However is does not work the try statement says there is a problem with My insert statement.
So I remove the Date Value and there are no problems so it must be somthing when i try to insert the Date into the field .
Here are the insert statements I have used. and none work
OleCommand_Insert = New OleDbCommand("INSERT INTO tblMachineHistory(Make,Model,HP,Problem,Drop,Extra_Info,Customer_ID,Rating) Values ('" & Make & "','" & Model & "','" & HP & "','" & Now & "','" & MacProblem & "','" & Extra_Info & "'," & CustomerID & "," & Min & ")", Connection_Insert)
OleCommand_Insert = New OleDbCommand("INSERT INTO tblMachineHistory(Make,Model,HP,Problem,Drop,Extra_Info,Customer_ID,Rating) Values ('" & Make & "','" & Model & "','" & HP & "'," & Now & ",'" & MacProblem & "','" & Extra_Info & "'," & CustomerID & "," & Min & ")", Connection_Insert)
OleCommand_Insert = New OleDbCommand("INSERT INTO tblMachineHistory(Make,Model,HP,Problem,Drop,Extra_Info,Customer_ID,Rating) Values ('" & Make & "','" & Model & "','" & HP & "'," & DateTime.Now & ",'" & MacProblem & "','" & Extra_Info & "'," & CustomerID & "," & Min & ")", Connection_Insert)
I would be very greatful if someone could give me hand with this thanks ,