Hi, I try to update my form in that dateedite (InvoiceDate) getting Syntax error. This is my code. Help me to solve this ?
OleDbCommand top = new OleDbCommand("UPDATE NewInvoice_1 SET Terms = " + CBL_Terms.EditValue.ToString() + ", InvoiceDate= " + CBL_Date.DateTime + ", OurQuote='" + TXE_OurQuote.Text + "', SalesPerson=" + CBL_Sales_Person.EditValue.ToString() + ", CustomerName=" + CBL_Customer_Name.EditValue.ToString() + ", OrderNumber='" + TXE_Order_Number.Text + "', InvoiceAddress='" + TXE_Invoice_Address.Text + "', DeliveryAddress='" + TXE_Delivery_Address.Text + "', WholeDiscountP=" + Convert.ToDecimal(TXE_FlatDiscountP.Text) + ", WholeDiscountA=" + Convert.ToDecimal(TXE_FlatDiscountA.Text) + ", ShippingP=" + Convert.ToDecimal(TXE_ShippingPercentage.Text) + ", ShippingA=" + Convert.ToDecimal(TXE_ShippingAmount.Text) + ", Price=" + Convert.ToDecimal(TXE_SubTotal.Text) + ", Discount=" + Convert.ToDecimal(TXE_Discount.Text) + ", Tax=" + Convert.ToDecimal(TXE_Tax.Text) + ", Shipping=" + Convert.ToDecimal(TXE_Shipping.Text) + ", GrandTotal=" + Convert.ToDecimal(TXE_GrandTotal.Text) + ", TaxforDisc=" + barCheckItem1.Checked + ", DiscountType='" + selectedItem + "', ShippingBy='" + TXE_Shipping_By.Text + "',ShipReferenceNo='" + TXE_Reference_No.Text + "', IsInsured=" + CBX_Is_Insured.Checked + ", Notes='" + TXE_Notes.Text + "', DueDate=" + CBL_DueDate.DateTime + ", AmountinWords='" + TXE_AmountinWords.Text + "' WHERE InvoiceId=" + TXE_Unvisible.Text, conn);
top.ExecuteNonQuery();
Thank in advance.