Troubleshooting - Getting QODBC Not Supported error while Inserting Invoice
Problem Description:
I am trying to insert an Invoice, But I am getting the below error:
[QODBC] Not supported (#10003)
I am using below SQL statements:
INSERT INTO "InvoiceLine" ("InvoiceLineItemRefListID," "InvoiceLineDesc," "InvoiceLineRate," "InvoiceLineAmount," "InvoiceLineSalesTaxCodeRefListID," "FQSaveToCache") VALUES ('250000-933272656', 'Building permit 3', 3.00000, 3.00, '', 1)
INSERT INTO "Invoice" ("CustomerRefListID," "ARAccountRefListID," "TxnDate," "RefNumber," "BillAddressAddr1", "BillAddressAddr2", "BillAddressCity," "BillAddressState," "BillAddressPostalCode," "BillAddressCountry," "spending," "TermsRefListID," "DueDate," "ShipDate," "ItemSalesTaxRefListID," "Memo," "IsToBePrinted," "CustomerSalesTaxCodeRefListID") VALUES ('470001-1071525403', '40000-933270541', {d'2002-10-01'}, '1', 'Brad Lamb,' '1921 Appleseed Lane', 'Bayshore,' 'CA,' '94326', 'USA,' 0, '10000-933272658', {d'2002-10-31'}, {d'2002-10-01'}, '2E0000-933272656', 'Memo Test,' 0, '10000-999022286')
I am getting the below error:
Please let me know what I am doing wrong.
Solutions:
You need to either provide a value for SalesTaxCodeRefListID, remove it, or pass null as a value instead of an empty string from the insert statement.
Your insert statement should be as below:
INSERT INTO "InvoiceLine" ("InvoiceLineItemRefListID," "InvoiceLineDesc," "InvoiceLineRate," "InvoiceLineAmount," "InvoiceLineSalesTaxCodeRefListID," "FQSaveToCache") VALUES ('250000-933272656', 'Building permit 3', 3.00000, 3.00, null, 1)
INSERT INTO "Invoice" ("CustomerRefListID," "ARAccountRefListID," "TxnDate," "RefNumber," "BillAddressAddr1", "BillAddressAddr2", "BillAddressCity," "BillAddressState," "BillAddressPostalCode," "BillAddressCountry," "IsPending," "TermsRefListID," "DueDate," "ShipDate," "ItemSalesTaxRefListID," "Memo," "IsToBePrinted," "CustomerSalesTaxCodeRefListID") VALUES ('470001-1071525403', '40000-933270541', {d'2002-10-01'}, '1', 'Brad Lamb,' '1921 Appleseed Lane', 'Bayshore,' 'CA,' '94326', 'USA,' 0, '10000-933272658', {d'2002-10-31'}, {d'2002-10-01'}, '2E0000-933272656', 'Memo Test,' 0, '10000-999022286')
|