AM trying to update the date in that query am getting this error Syntax error in UPDATE statement., this is my code
Updated Code
OleDbCommand top = new OleDbCommand(
"UPDATE NewInvoice_1 SET (" +
"Terms=?, [InvoiceDate]=?, OurQuote=?," +
"SalesPerson=?, CustomerName=?, OrderNumber=?," +
"InvoiceAddress=?, DeliveryAddress=?," +
"WholeDiscountP=?, WholeDiscountA=?, ShippingP=?, ShippingA=?," +
"Price=?, Discount=?, Tax=?," +
"Shipping=?, GrandTotal=?, TaxforDisc=?, DiscountType=?," +
"ShippingBy=?, ShipReferenceNo=?, IsInsured=?, Notes=?," +
"[DueDate]=?, AmountinWords=? ) WHERE InvoiceId=?", conn);
top.Parameters.AddWithValue("?", CBL_Terms.EditValue.ToString());
top.Parameters.AddWithValue("?", CBL_Date.DateTime);
top.Parameters.AddWithValue("?", TXE_OurQuote.Text);
top.Parameters.AddWithValue("?", CBL_Sales_Person.EditValue.ToString());
top.Parameters.AddWithValue("?", CBL_Customer_Name.EditValue.ToString());
top.Parameters.AddWithValue("?", TXE_Order_Number.Text);
top.Parameters.AddWithValue("?", TXE_Invoice_Address.Text);
top.Parameters.AddWithValue("?", TXE_Delivery_Address.Text);
top.Parameters.AddWithValue("?", Convert.ToDecimal(TXE_FlatDiscountP.Text));
top.Parameters.AddWithValue("?", Convert.ToDecimal(TXE_FlatDiscountA.Text));
top.Parameters.AddWithValue("?", Convert.ToDecimal(TXE_ShippingPercentage.Text));
top.Parameters.AddWithValue("?", Convert.ToDecimal(TXE_ShippingAmount.Text));
top.Parameters.AddWithValue("?", Convert.ToDecimal(TXE_SubTotal.Text));
top.Parameters.AddWithValue("?", Convert.ToDecimal(TXE_Discount.Text));
top.Parameters.AddWithValue("?", Convert.ToDecimal(TXE_Tax.Text));
top.Parameters.AddWithValue("?", Convert.ToDecimal(TXE_Shipping.Text));
top.Parameters.AddWithValue("?", Convert.ToDecimal(TXE_GrandTotal.Text));
top.Parameters.AddWithValue("?", barCheckItem1.Checked);
top.Parameters.AddWithValue("?", selectedItem);
top.Parameters.AddWithValue("?", TXE_Shipping_By.Text);
top.Parameters.AddWithValue("?", TXE_Reference_No.Text);
top.Parameters.AddWithValue("?", CBX_Is_Insured.Checked);
top.Parameters.AddWithValue("?", TXE_Notes.Text);
top.Parameters.AddWithValue("?", CBL_DueDate.DateTime);
top.Parameters.AddWithValue("?", TXE_AmountinWords.Text);
top.Parameters.AddWithValue("?", TXE_Unvisible.Text);
top.ExecuteNonQuery();
Now I update my code to parameters but getting Syntax error on updating code