I get an error when trying to insert a record into the database.
Here's the error:
The Code:
connection.Open();
OleDbCommand command = new OleDbCommand();
command.Connection = connection;
command.CommandText = "INSERT INTO [Booking] (TableID, BookingName, BookingNumber, BookingDate, PartySize) VALUES (@TableID, @BookingName, @BookingPhoneNumber, @BookingDate, @PartySize)";
command.Parameters.AddRange(new OleDbParameter[] {
new OleDbParameter("@TableID", textBoxResTableID.Text),
new OleDbParameter("@BookingName", textBoxResName.Text),
new OleDbParameter("@BookingPhoneNumber", textBoxResNum.Text),
new OleDbParameter("@BookingDate", DateTime.Today),
new OleDbParameter("@PartySize", textBoxResPartySize.Text)
});
command.ExecuteNonQuery();
connection.Close();
The DB: