Knowledgebase
[QODBC-Desktop] Troubleshooting - Creating PO using Alpha Five basic scripting not working correctly
Posted by Jack - QODBC Support on 10 November 2016 06:19 AM

Troubleshooting - Creating PO using Alpha Five basic scripting is not working correctly

Problem Description:

I am using Alpha 5 version 10.5 basic scripting to export our data to QB Enterprise 2016.

I have successfully exported our customer and inventory data without any issues. All data looks complete and is fully functional.

My problem is exporting our Supplier Orders. Following your tutorial on How to create a Purchase Order using QODBC

It will not work correctly. It creates the PO in QB. However, it will only add the last line item to the PO. I am using the FQSaveToCache field set to 1 for all lines except the final, which is set to 0 and will only write the last line.

When I generate the SQL code from my A5 basic script to a text file and copy/paste the SQL code into Alpha 5's SQL command window, I get the same results, and only the last line item is written to the PO. When I paste it into the QODBC Test Tool program, it works correctly, generating the PO with all line items as expected.

These are SQL lines generated from A5.

INSERT INTO PurchaseOrderLine (VendorRefListID, RefNumber, PurchaseOrderLineItemRefListID, PurchaseOrderLineQuantity, FQSaveToCache) VALUES ('80000172-1402174943', '14731', '80004374-1474850327', 10, 1)

INSERT INTO PurchaseOrderLine (VendorRefListID, RefNumber, PurchaseOrderLineItemRefListID, PurchaseOrderLineQuantity, FQSaveToCache) VALUES ('80000172-1402174943', '14731', '8000435E-1474850314', 10, 1)

INSERT INTO PurchaseOrderLine (VendorRefListID, RefNumber, PurchaseOrderLineItemRefListID, PurchaseOrderLineQuantity, FQSaveToCache) VALUES ('80000172-1402174943', '14731', '8000437A-1474850332', 10, 0)
 

Solution:

I think your connection is dropping during insertion & due to this issue. So please verify the same & test again. So please verify the same & test again. Please ensure that you are executing all queries in the current connection. If the connection is reset, all lines will not be inserted.

(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please complete the captcha below (we use this to prevent automated submissions).