[QODBC-Desktop] How to delete an Invoice Line in the InvoiceLine table using QODBC
Posted by brad waddell on 12 March 2009 05:21 PM
|
|
An Example of Deleting an InvoiceLineCreate an Invoice with Three LinesFirst Line INSERT INTO "InvoiceLine" ("CustomerRefListID", "RefNumber",
Second Line INSERT INTO "InvoiceLine" ("CustomerRefListID", "RefNumber",
Third (Last) Line INSERT INTO "InvoiceLine" ("CustomerRefListID", "RefNumber",
Result Displayed in QuickBooksOnce these three SQL INSERT commands have been run in sequence (without breaking the QODBC connection), QODBC will generate the following Invoice in the Sample Rock Castle Construction company file in the USA edition of QuickBooks 2006. Note: See Line 3 of the invoice below for line item discount of $50.00 :
Locate the TxnID and InvoiceLineTxnLineIDTo locate the TxnID and InvoiceLineTxnLineID for the new invoice lines we run the following query using VB Demo: SELECT TxnID, InvoiceLineTxnLineID, InvoiceLineDesc, InvoiceLineAmount,
Delete the Last Line in InvoiceLine TableTo delete the last line we run the following query using the TxnID and InvoiceLIneTxnLineID values for the last invoice line in VB Demo: delete from InvoiceLine where TxnID='5BAB-1197758658' Result Displayed in QODBC The last invoice line is now deleted and it can be verified by re-running: SELECT TxnID, InvoiceLineTxnLineID, InvoiceLineDesc, InvoiceLineAmount, Note: All regions outside the United States should use TaxCode instead of SalesTaxCode. | |
|
I have try to delete invoice line
delete from InvoiceLine where TxnID='5BAB-1197758658'
and InvoiceLineTxnLineID='5BAF-1197758658'
i am getting Error ..
actually it work on VBDEMO .. but not work in my code ..
thank you