I am trying to delete the records in InvoiceItems and TAXINVOICE tables.But there is some query distraction occuring while writing to Ole db statement.I am trying like this.The exact tables in MS access are InvoiceItems and TAXINVOICE. The InvoiceItems has the following fields as InvoiceItem,InvoiceNumber,ProductId,Quantity,UOM,UnitPrice,GrossAmount,VAT,VatAmount,
Total
and TAXINVOICE has fields of INVOICENO,MOBILENUMBER,CUSTOMERNAME,ADDRESS1,ADDRESS2,TINNO,PONO,TRANSPORT,BILLDATE,
InvoiceType,PODATE,totalGrossAmt,totalVatAmt,BILLAMT,TRANSPORTAMT,OTHERAMT,FINALAMT,
ROUNDOFF and GRANDTOTAL
What I have tried:
cmd = new OleDbCommand("DELETE InvoiceNumber,TAXINVOICE FROM InvoiceItems INNER JOIN TAXINVOICE WHERE InvoiceItems.InvoiceNumber=TAXINVOICE.INVOICENO and InvoiceNumber=" + txtInvoice.ToString() , conn);