Member Login

Username
Password
Forget Password
New Sign Up
Search Forum

Buy Support
Incidents

If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:

Click Here
If you can't login and post questions or you are having trouble viewing forum posts:
Click Here
Callback
Support

If you live in USA, UK, Canada, Australia or New Zealand, you can leave us details on your question and request us to call you back and discuss them with you personally  (charges apply).

Click Here
 
Buy Support
Incidents
If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:
Click Here

Forum : Error Parsing Complete XML String when inserting invoicelineSearch Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC v7 Forum

 New Topic 
 
 Post Reply 
[1]  
 Error Parsing Complete XML String when inserting invoiceline 
 Author   Message 
  john40875 
  
 Group: Members 
 Posts: 1 
 Joined: 2007-06-30 
 Profile
 Posted : 2007-06-30 18:37:40

I'm attempting to add an item (invoiceline)  to the invoiceline table using QB Pro 2005 and v7.00.00.207 of the QODBC driver. 

Trying to get the date to show for invoicelineservicedate but its not allowing me.

I keep getting Error Parsing Complete XML String when inserting invoiceline in VB DEMO.

Here's my SQL statement:


INSERT INTO InvoiceLine (CustomerRefListID,InvoiceLineItemRefListID, InvoiceLineRate, 
InvoiceLineQuantity, InvoiceLineserviceDate, FQSaveToCache) VALUES ('2910000-1103038565', '50000-1025624621',
20,10,{d'2007-06-30'},0)

The SDK log contains:


20070630.042631 I 3916 QBSDKProcessRequest Application named 'FLEXquarters QODBC' starting requests (process 1564).
20070630.042631 E 3916 XercesSAXErrorHandler Element 'ItemRef' is not valid for content model: '(ItemRef?,Desc?,Quantity?,((Rate|RatePercent|PriceLevelRef))?,ClassRef?,Amount?,ServiceDate?,SalesTaxCodeRef?,IsTaxable?,OverrideItemAccountRef?)' -- error at line 7, column 238 in XML data.
20070630.042631 I 3916 MsgSetHandler Parser error, finishing.
20070630.042631 I 3916 QBSDKProcessRequest Application named 'FLEXquarters QODBC' finishing requests (process 1564), ret = 1.
20070630.042631 E 1564 RequestProcessor Process Request error = 80042500, There was an error when parsing the provided XML file.

The QODBC log contains:


2007-06-30 04:26:31 QODBC Ver:  7.00.00.204 *********************************************************************************************************************
IsAService: False
SQL Statement:

INSERT INTO InvoiceLine (CustomerRefListID,InvoiceLineItemRefListID, InvoiceLineRate, 

InvoiceLineQuantity, InvoiceLineserviceDate, FQSaveToCache) VALUES ('2910000-1103038565', '50000-1025624621',

20,10,{d'2007-06-30'},0)
Error parsing complete XML return string (8)
Input XML:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?qbxml version="4.1"?>
<QBXML>
    <QBXMLMsgsRq onError = "continueOnError" responseData = "includeAll">
        <InvoiceAddRq requestID = "1">
            <InvoiceAdd defMacro = "TxnID:6DE58EE6-4C21-4D4B-A1B9-F9D86ED0FB87">
                <CustomerRef>
                    <ListID>2910000-1103038565</ListID>
                </CustomerRef>
                <InvoiceLineAdd>
                    <ServiceDate>2007-06-30</ServiceDate>
                    <ItemRef>
                        <ListID>50000-1025624621</ListID>
                    </ItemRef>
                    <Quantity>10.00000</Quantity>
                    <Rate>20.00000</Rate>
                </InvoiceLineAdd>
            </InvoiceAdd>
        </InvoiceAddRq>
    </QBXMLMsgsRq>
</QBXML>

 

Please help.

  

 
jr 
 
  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-06-30 21:17:21

Ok the columns are in the wrong order and you need to add a InvoiceLineAmount. This worked for me:

INSERT INTO "InvoiceLine" ("CustomerRefListID", "RefNumber", "InvoiceLineItemRefListID",
"InvoiceLineDesc", "InvoiceLineRate", "InvoiceLineAmount", "InvoiceLineserviceDate",
"FQSaveToCache") VALUES ('80000-1045537156','599', '90000-1045537150',
'4m Steel Ladder', 1.00000, 150.00, {d'2007-06-30'}, 0)

And this invoice appeared in QuickBooks like this:

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to