You can actually insert the RefNumber in the first place, but for the purpose of the execise, I just ran the following test using QODBC v6.00.00.155 without breaking the connection without any problems :
INSERT INTO "InvoiceLine" ("InvoiceLineItemRefListID", "InvoiceLineDesc", "InvoiceLineRate", "InvoiceLineAmount", "InvoiceLineSalesTaxCodeRefListID", "FQSaveToCache") VALUES ('250000-933272656', 'Building permit A', 3.00000, 3.00, '20000-999022286', 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'}, 'QODBC1A', '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')
SP_LASTINSERTID Invoice
Select RefNumber, BillAddressAddr1 from Invoice where TxnID='5BEE-1197757041'
|