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 : Inconsistent Missing TxnID errorSearch Forum

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

 New Topic 
 
 Post Reply 
[1]  
 Inconsistent Missing TxnID error 
 Author   Message 
  Ian 
  
 Group: Members 
 Posts: 4 
 Joined: 2006-05-20 
 Profile
 Posted : 2006-11-29 02:36:05

When creating/updating multi-line invoices, we are seeing inconsistent results.  Some invoices create fine while others fail on a Missing TxnID error, sometimes within the same batch of invoices being created/updated...here is some sample data.  Has anyone seen this and perhaps has an answer to this issue.  It is a little confusing since it is not consistent behaviour.

Thanks in advance,

Ian

insert into InvoiceLine (RefNumber, ShipAddressAddr1, ShipAddressAddr2, ShipAddressAddr3, ShipAddressCity, ShipAddressState, ShipAddressPostalCode, ShipAddressCountry, CustomerRefListID, TxnDate, InvoiceLineItemRefFullName, InvoiceLineQuantity, InvoiceLineRate, InvoiceLineAmount, ShipMethodRefFullName, CustomFieldProduct, SalesRepRefFullName, ItemSalesTaxRefFullName, IsToBePrinted, PONumber, FQSaveToCache

 

) values('106658','Kathleen Andrews','8 America Drive','','Peabody','MA','01960','US','29730000-1155344730',{d'2006-06-27'},'0042-101 - Wall Clock',1,129.95,129.95,'UPS','Paid','nexte','Out of state',0,'Check #470',1)

 

2006-11-14 08:37:02.734 InterWeave 2.3` iwtransformationserver insert into InvoiceLine (RefNumber, ShipAddressAddr1, ShipAddressAddr2, ShipAddressAddr3, ShipAddressCity, ShipAddressState, ShipAddressPostalCode, ShipAddressCountry, CustomerRefListID, TxnDate, InvoiceLineItemRefFullName, InvoiceLineQuantity, InvoiceLineRate, InvoiceLineAmount, ShipMethodRefFullName, CustomFieldProduct, SalesRepRefFullName, ItemSalesTaxRefFullName, IsToBePrinted, PONumber, FQSaveToCache

 

) values('106658','Kathleen Andrews','8 America Drive','','Peabody','MA','01960','US','29730000-1155344730',{d'2006-06-27'},'2184 - A Dignified Life...',1,12.95,12.95,'UPS','Paid','nexte','Out of state',0,'Check #470',1)

 

2006-11-14 08:37:02.812 InterWeave 2.3` iwtransformationserver insert into InvoiceLine (RefNumber, ShipAddressAddr1, ShipAddressAddr2, ShipAddressAddr3, ShipAddressCity, ShipAddressState, ShipAddressPostalCode, ShipAddressCountry, CustomerRefListID, TxnDate, InvoiceLineItemRefFullName, InvoiceLineQuantity, InvoiceLineRate, InvoiceLineAmount, ShipMethodRefFullName, CustomFieldProduct, SalesRepRefFullName, ItemSalesTaxRefFullName, IsToBePrinted, PONumber, FQSaveToCache

 

) values('106658','Kathleen Andrews','8 America Drive','','Peabody','MA','01960','US','29730000-1155344730',{d'2006-06-27'},'2201 - Learning to Speak Alz.',1,23.95,23.95,'UPS','Paid','nexte','Out of state',0,'Check #470',1)

 

2006-11-14 08:37:02.906 InterWeave 2.3` iwtransformationserver insert into InvoiceLine (RefNumber, ShipAddressAddr1, ShipAddressAddr2, ShipAddressAddr3, ShipAddressCity, ShipAddressState, ShipAddressPostalCode, ShipAddressCountry, CustomerRefListID, TxnDate, InvoiceLineItemRefFullName, InvoiceLineQuantity, InvoiceLineRate, InvoiceLineAmount, ShipMethodRefFullName, CustomFieldProduct, SalesRepRefFullName, ItemSalesTaxRefFullName, IsToBePrinted, PONumber, FQSaveToCache

 

) values('106658','Kathleen Andrews','8 America Drive','','Peabody','MA','01960','US','29730000-1155344730',{d'2006-06-27'},'0153 - Memory Card Deck',1,13.95,13.95,'UPS','Paid','nexte','Out of state',0,'Check #470',1)

 

2006-11-14 08:37:02.984 InterWeave 2.3` iwtransformationserver insert into InvoiceLine (RefNumber, ShipAddressAddr1, ShipAddressAddr2, ShipAddressAddr3, ShipAddressCity, ShipAddressState, ShipAddressPostalCode, ShipAddressCountry, CustomerRefListID, TxnDate, InvoiceLineItemRefFullName, InvoiceLineQuantity, InvoiceLineRate, InvoiceLineAmount, ShipMethodRefFullName, CustomFieldProduct, SalesRepRefFullName, ItemSalesTaxRefFullName, IsToBePrinted, PONumber, FQSaveToCache) values('106658','Kathleen Andrews','8 America Drive','','Peabody','MA','01960','US','29730000-1155344730',{d'2006-06-27'},'Shipping & Handling',1,11.74,11.74,'UPS','Paid','nexte','Out of state',0,'Check #470',0)

 

Here are failed transactions:

 

2006-11-14 08:41:42.359 InterWeave 2.3` iwtransformationserver insert into InvoiceLine (RefNumber, ShipAddressAddr1, ShipAddressAddr2, ShipAddressAddr3, ShipAddressCity, ShipAddressState, ShipAddressPostalCode, ShipAddressCountry, CustomerRefListID, TxnDate, InvoiceLineItemRefFullName, InvoiceLineQuantity, InvoiceLineRate, InvoiceLineAmount, ShipMethodRefFullName, CustomFieldProduct, SalesRepRefFullName, ItemSalesTaxRefFullName, IsToBePrinted, PONumber, FQSaveToCache

 

) values('106730','Dallas Co Care Center','631 W Main','','Buffalo','MO','65622','US','29DC0000-1155345360',{d'2006-07-06'},'0088 - Small Lock Box',1,59.95,59.95,'UPS','Paid','nexte','Out of state',0,'Pd Ck# 046938 CAJ663006A',1)

 

2006-11-14 08:41:42.437 InterWeave 2.3` iwtransformationserver insert into InvoiceLine (RefNumber, ShipAddressAddr1, ShipAddressAddr2, ShipAddressAddr3, ShipAddressCity, ShipAddressState, ShipAddressPostalCode, ShipAddressCountry, CustomerRefListID, TxnDate, InvoiceLineItemRefFullName, InvoiceLineQuantity, InvoiceLineRate, InvoiceLineAmount, ShipMethodRefFullName, CustomFieldProduct, SalesRepRefFullName, ItemSalesTaxRefFullName, IsToBePrinted, PONumber, FQSaveToCache

 

) values('106730','Dallas Co Care Center','631 W Main','','Buffalo','MO','65622','US','29DC0000-1155345360',{d'2006-07-06'},'2224 - Keeping Busy',1,16.95,16.95,'UPS','Paid','nexte','Out of state',0,'Pd Ck# 046938 CAJ663006A',1)

 

2006-11-14 08:41:42.515 InterWeave 2.3` iwtransformationserver insert into InvoiceLine (RefNumber, ShipAddressAddr1, ShipAddressAddr2, ShipAddressAddr3, ShipAddressCity, ShipAddressState, ShipAddressPostalCode, ShipAddressCountry, CustomerRefListID, TxnDate, InvoiceLineItemRefFullName, InvoiceLineQuantity, InvoiceLineRate, InvoiceLineAmount, ShipMethodRefFullName, CustomFieldProduct, SalesRepRefFullName, ItemSalesTaxRefFullName, IsToBePrinted, PONumber, FQSaveToCache

 

) values('106730','Dallas Co Care Center','631 W Main','','Buffalo','MO','65622','US','29DC0000-1155345360',{d'2006-07-06'},'2196 - Gentlemens Gatherings',1,8.95,8.95,'UPS','Paid','nexte','Out of state',0,'Pd Ck# 046938 CAJ663006A',1)

 

2006-11-14 08:41:42.609 InterWeave 2.3` iwtransformationserver insert into InvoiceLine (RefNumber, ShipAddressAddr1, ShipAddressAddr2, ShipAddressAddr3, ShipAddressCity, ShipAddressState, ShipAddressPostalCode, ShipAddressCountry, CustomerRefListID, TxnDate, InvoiceLineItemRefFullName, InvoiceLineQuantity, InvoiceLineRate, InvoiceLineAmount, ShipMethodRefFullName, CustomFieldProduct, SalesRepRefFullName, ItemSalesTaxRefFullName, IsToBePrinted, PONumber, FQSaveToCache) values('106730','Dallas Co Care Center','631 W Main','','Buffalo','MO','65622','US','29DC0000-1155345360',{d'2006-07-06'},'Shipping & Handling',1,13.95,13.95,'UPS','Paid','nexte','Out of state',0,'Pd Ck# 046938 CAJ663006A',0)

 

2006-11-14 08:41:42.906 InterWeave 2.3` iwtransformationserver SQL Statement exeception: insert into InvoiceLine (RefNumber, ShipAddressAddr1, ShipAddressAddr2, ShipAddressAddr3, ShipAddressCity, ShipAddressState, ShipAddressPostalCode, ShipAddressCountry, CustomerRefListID, TxnDate, InvoiceLineItemRefFullName, InvoiceLineQuantity, InvoiceLineRate, InvoiceLineAmount, ShipMethodRefFullName, CustomFieldProduct, SalesRepRefFullName, ItemSalesTaxRefFullName, IsToBePrinted, PONumber, FQSaveToCache) values('106730','Dallas Co Care Center','631 W Main','','Buffalo','MO','65622','US','29DC0000-1155345360',{d'2006-07-06'},'Shipping & Handling',1,13.95,13.95,'UPS','Paid','nexte','Out of state',0,'Pd Ck# 046938 CAJ663006A',0) [QODBC] Error: 3150 - There is a missing element: "TxnID".

 

iwtransformationserver ERROR XmlsqParams.statement

 

2006-11-14 08:41:42.906 InterWeave 2.3` iwtransformationserver insert into InvoiceLine (RefNumber, ShipAddressAddr1, ShipAddressAddr2, ShipAddressAddr3, ShipAddressCity, ShipAddressState, ShipAddressPostalCode, ShipAddressCountry, CustomerRefListID, TxnDate, InvoiceLineItemRefFullName, InvoiceLineQuantity, InvoiceLineRate, InvoiceLineAmount, ShipMethodRefFullName, CustomFieldProduct, SalesRepRefFullName, ItemSalesTaxRefFullName, IsToBePrinted, PONumber, FQSaveToCache

 

) values('106732','Kelly Fobia','42020 4th Street East','','Lancaster','CA','93535','US','2A370000-1155345748',{d'2006-07-06'},'0155-OC - Occupations Jingo Gam',1,12.95,12.95,'UPS','Paid','nexte','Out of state',0,'pd ck 2466',1)

 

2006-11-14 08:41:43.0 InterWeave 2.3` iwtransformationserver insert into InvoiceLine (RefNumber, ShipAddressAddr1, ShipAddressAddr2, ShipAddressAddr3, ShipAddressCity, ShipAddressState, ShipAddressPostalCode, ShipAddressCountry, CustomerRefListID, TxnDate, InvoiceLineItemRefFullName, InvoiceLineQuantity, InvoiceLineRate, InvoiceLineAmount, ShipMethodRefFullName, CustomFieldProduct, SalesRepRefFullName, ItemSalesTaxRefFullName, IsToBePrinted, PONumber, FQSaveToCache

 

) values('106732','Kelly Fobia','42020 4th Street East','','Lancaster','CA','93535','US','2A370000-1155345748',{d'2006-07-06'},'0150 - Senior Sez',1,28.95,28.95,'UPS','Paid','nexte','Out of state',0,'pd ck 2466',1)

 

2006-11-14 08:41:43.093 InterWeave 2.3` iwtransformationserver insert into InvoiceLine (RefNumber, ShipAddressAddr1, ShipAddressAddr2, ShipAddressAddr3, ShipAddressCity, ShipAddressState, ShipAddressPostalCode, ShipAddressCountry, CustomerRefListID, TxnDate, InvoiceLineItemRefFullName, InvoiceLineQuantity, InvoiceLineRate, InvoiceLineAmount, ShipMethodRefFullName, CustomFieldProduct, SalesRepRefFullName, ItemSalesTaxRefFullName, IsToBePrinted, PONumber, FQSaveToCache

 

) values('106732','Kelly Fobia','42020 4th Street East','','Lancaster','CA','93535','US','2A370000-1155345748',{d'2006-07-06'},'0183 - Conversation Cards - Eve',1,17.95,17.95,'UPS','Paid','nexte','Out of state',0,'pd ck 2466',1)

 

2006-11-14 08:41:43.171 InterWeave 2.3` iwtransformationserver insert into InvoiceLine (RefNumber, ShipAddressAddr1, ShipAddressAddr2, ShipAddressAddr3, ShipAddressCity, ShipAddressState, ShipAddressPostalCode, ShipAddressCountry, CustomerRefListID, TxnDate, InvoiceLineItemRefFullName, InvoiceLineQuantity, InvoiceLineRate, InvoiceLineAmount, ShipMethodRefFullName, CustomFieldProduct, SalesRepRefFullName, ItemSalesTaxRefFullName, IsToBePrinted, PONumber, FQSaveToCache

 

) values('106732','Kelly Fobia','42020 4th Street East','','Lancaster','CA','93535','US','2A370000-1155345748',{d'2006-07-06'},'0157-Jingo Chips',1,4.95,4.95,'UPS','Paid','nexte','Out of state',0,'pd ck 2466',1)

 

2006-11-14 08:41:43.25 InterWeave 2.3` iwtransformationserver insert into InvoiceLine (RefNumber, ShipAddressAddr1, ShipAddressAddr2, ShipAddressAddr3, ShipAddressCity, ShipAddressState, ShipAddressPostalCode, ShipAddressCountry, CustomerRefListID, TxnDate, InvoiceLineItemRefFullName, InvoiceLineQuantity, InvoiceLineRate, InvoiceLineAmount, ShipMethodRefFullName, CustomFieldProduct, SalesRepRefFullName, ItemSalesTaxRefFullName, IsToBePrinted, PONumber, FQSaveToCache) values('106732','Kelly Fobia','42020 4th Street East','','Lancaster','CA','93535','US','2A370000-1155345748',{d'2006-07-06'},'Shipping & Handling',1,11.95,11.95,'UPS','Paid','nexte','Out of state',0,'pd ck 2466',0)

 

2006-11-14 08:41:43.828 InterWeave 2.3` iwtransformationserver SQL Statement exeception: insert into InvoiceLine (RefNumber, ShipAddressAddr1, ShipAddressAddr2, ShipAddressAddr3, ShipAddressCity, ShipAddressState, ShipAddressPostalCode, ShipAddressCountry, CustomerRefListID, TxnDate, InvoiceLineItemRefFullName, InvoiceLineQuantity, InvoiceLineRate, InvoiceLineAmount, ShipMethodRefFullName, CustomFieldProduct, SalesRepRefFullName, ItemSalesTaxRefFullName, IsToBePrinted, PONumber, FQSaveToCache) values('106732','Kelly Fobia','42020 4th Street East','','Lancaster','CA','93535','US','2A370000-1155345748',{d'2006-07-06'},'Shipping & Handling',1,11.95,11.95,'UPS','Paid','nexte','Out of state',0,'pd ck 2466',0) [QODBC] Error: 3150 - There is a missing element: "TxnID".

 

iwtransformationserver ERROR XmlsqParams.statement

 

 

 
Do or do not. There is no try 
 
  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-11-29 13:29:25

If you are using a threaded environment, or if you run other queries in between the insert statements, it's possible that the connection was broken with the cached lines already executed.

Try running the failed statements in VB Demo to see if they are really valid or not.

 

  Top 
  Ian 
  
 Group: Members 
 Posts: 4 
 Joined: 2006-05-20 
 Profile
 Posted : 2006-11-30 13:30:17
That was the first thing we did.  These queries are valid using VB Demo. 

 
Do or do not. There is no try 
 
  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-11-30 13:51:04
If the transactions themselves are valid, then it appears you are not running them consecutively, but in multiple threads. Some enviroments need the use of the "Plan B" technique as shown in: Using ClassRefListID when inserting invoice lines  

  Top 
  Ian 
  
 Group: Members 
 Posts: 4 
 Joined: 2006-05-20 
 Profile
 Posted : 2006-12-01 00:49:29

Tom,

Actually we are using multiple calls in one thread.  In fact the transaction is a single "for" loop in the same Java method.  We are using the Sun JDBC/ODBC bridge which does not support concurrent access from different threads.

However are you recommending that we always execute a header record creation or is this really a trial and error process?

TIA,

Ian

 

 
Do or do not. There is no try 
 
  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-12-01 09:23:45

Your error is indicating that QODBC thinks that the invoice exists and you're adding another line to it. That's why it's asking for the TxnID. In environments where cached transactions do not work consistantly, we do "Plan B" and create the first invoice line and then add lines to it. 

There's also a DoPassthrough flag bug in QODBC v7.00.00.199 that is causing us a number of problems currently.

 

  Top 
  thragar 
  
 Group: Members 
 Posts: 11 
 Joined: 2008-05-13 
 Profile
 Posted : 2008-09-11 02:05:10
Hi,

I'm getting this error, except that my statement doesn't work in the VB Demo either:

INSERT INTO invoiceLine (InvoiceLineItemRefListID,InvoiceLineDesc,InvoiceLineRate,InvoiceLineAmount,InvoiceLineTaxCodeRefListID,FQSaveToCache) VALUES ('F0000-1015877850','',25,500,'20000-1014853778',1)

INSERT INTO invoice (CustomerRefListID,ARAccountRefListID,TemplateRefListID,TxnDate,RefNumber,DueDate,ShipDate,Memo,CustomFieldClient) VALUES ('BA0000-1017848217','50000-1014927587','80000-1016132419',{d'2008-01-01'},'1234',{d'2008-01-01'},{d'2008-01-01'},'qserver unit test','Adrian Whatshisface')

What's funny is that this invoice gets made despite the error, except that the CustomFieldClient field is some random address... Any help would be appreciated. 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-09-11 23:37:41
You didn't say what the error message was? Go to the QODBC Message log in the QODBC Setup Screen and scroll to the bottom and paste the INSERT trace and the error here. 

  Top 
  thragar 
  
 Group: Members 
 Posts: 11 
 Joined: 2008-05-13 
 Profile
 Posted : 2008-09-12 04:42:31
Hi,

It was a missing TxnID error.


<?xml version="1.0" ?>
<QBXML>
    <QBXMLMsgsRs>
        <InvoiceAddRs requestID="1" statusCode="0" statusSeverity="Info" statusMessage="Status OK">
            <InvoiceRet>
                <TxnID>A301D-1221062508</TxnID>
                <TimeCreated>2008-09-10T12:01:48-05:00</TimeCreated>
                <TimeModified>2008-09-10T12:01:48-05:00</TimeModified>
                <EditSequence>1221062508</EditSequence>
                <TxnNumber>35159</TxnNumber>
                <CustomerRef>
                    <ListID>BA0000-1017848217</ListID>
                    <FullName>Storey Homes</FullName>
                </CustomerRef>
                <ARAccountRef>
                    <ListID>50000-1014927587</ListID>
                    <FullName>Accounts Receivable</FullName>
                </ARAccountRef>
                <TemplateRef>
                    <ListID>80000-1016132419</ListID>
                    <FullName>WM&amp;A payments/credits</FullName>
                </TemplateRef>
                <TxnDate>2008-01-01</TxnDate>
                <RefNumber>1234</RefNumber>
                <BillAddress>
                    <Addr1>Don Storey</Addr1>
                    <Addr2>Storey Homes Limited</Addr2>
                    <Addr3>PO Box 1166</Addr3>
                    <City>Campbellford</City>
                    <State>ON</State>
                    <PostalCode>K0L 1L0</PostalCode>
                </BillAddress>
                <BillAddressBlock>
                    <Addr1>Don Storey</Addr1>
                    <Addr2>Storey Homes Limited</Addr2>
                    <Addr3>PO Box 1166</Addr3>
                    <Addr4>Campbellford, Ontario</Addr4>
                    <Addr5>K0L 1L0</Addr5>
                </BillAddressBlock>
                <ShipAddress>
                    <Addr1>FAX INVOICES</Addr1>
                </ShipAddress>
                <ShipAddressBlock>
                    <Addr1>FAX INVOICES</Addr1>
                </ShipAddressBlock>
                <IsPending>false</IsPending>
                <IsFinanceCharge>false</IsFinanceCharge>
                <DueDate>2008-01-01</DueDate>
                <ShipDate>2008-01-01</ShipDate>
                <Subtotal>500.00</Subtotal>
                <SalesTaxPercentage>5.00</SalesTaxPercentage>
                <SalesTaxTotal>25.00</SalesTaxTotal>
                <AppliedAmount>0.00</AppliedAmount>
                <BalanceRemaining>525.00</BalanceRemaining>
                <Memo>qserver unit test</Memo>
                <IsPaid>false</IsPaid>
                <IsToBePrinted>false</IsToBePrinted>
                <IsToBeEmailed>false</IsToBeEmailed>
                <IsTaxIncluded>false</IsTaxIncluded>
                <CustomerSalesTaxCodeRef>
                    <ListID>20000-1014853778</ListID>
                    <FullName>G</FullName>
                </CustomerSalesTaxCodeRef>
                <InvoiceLineRet>
                    <TxnLineID>A301F-1221062508</TxnLineID>
                    <ItemRef>
                        <ListID>F0000-1015877850</ListID>
                        <FullName>1 to 1</FullName>
                    </ItemRef>
                    <Rate>500</Rate>
                    <Amount>500.00</Amount>
                    <SalesTaxCodeRef>
                        <ListID>20000-1014853778</ListID>
                        <FullName>G</FullName>
                    </SalesTaxCodeRef>
                </InvoiceLineRet>
            </InvoiceRet>
        </InvoiceAddRs>
        <DataExtAddRs statusCode="3150" statusSeverity="Error" statusMessage="There is a missing element: &quot;TxnID&quot;." />
    </QBXMLMsgsRs>
</QBXML> 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-09-12 19:54:42
Ok, I'm guessing you're using QuickBooks 2008 Canadain Edition? If I'm right, you need to install the QODBC v9 beta, see: Release 9.0.0.250 Fixes  

  Top 
  thragar 
  
 Group: Members 
 Posts: 11 
 Joined: 2008-05-13 
 Profile
 Posted : 2008-09-13 04:20:43
I've tried the normal update package using the link provided and it still gives me this error.  And yes, I am using 2008 Canadian Pro.  Thanks! 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-09-14 15:04:14
Could you please run the statements again and repost the error, but this time don't cut off the actual insert statements and version info at the start. 

  Top 
  thragar 
  
 Group: Members 
 Posts: 11 
 Joined: 2008-05-13 
 Profile
 Posted : 2008-09-16 00:15:07
Hi,

Thanks for the response.  Here it is:

2008-09-15 10:14:16 QODBC Ver:  9.00.00.250 *********************************************************************************************************************
IsAService: False
SQL Statement: INSERT INTO invoice (CustomerRefListID,ARAccountRefListID,TemplateRefListID,TxnDate,RefNumber,DueDate,ShipDate,Memo,CustomFieldClient) VALUES ('BA0000-1017848217','50000-1014927587','80000-1016132419',{d'2008-01-01'},'1234',{d'2008-01-01'},{d'2008-01
-01'},'qserver unit test','Adrian Whatshisface')
3150 - There is a missing element: "TxnID".
Input XML:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?qbxml version="6.0"?>
<QBXML>
    <QBXMLMsgsRq onError = "continueOnError" responseData = "includeAll">
        <InvoiceAddRq requestID = "1">
            <InvoiceAdd defMacro = "TxnID:D9ABBA67-C792-4360-ABFC-9E13D72A9187">
                <CustomerRef>
                    <ListID>BA0000-1017848217</ListID>
                </CustomerRef>
                <ARAccountRef>
                    <ListID>50000-1014927587</ListID>
                </ARAccountRef>
                <TemplateRef>
                    <ListID>80000-1016132419</ListID>
                </TemplateRef>
                <TxnDate>2008-01-01</TxnDate>
                <RefNumber>1234</RefNumber>
                <DueDate>2008-01-01</DueDate>
                <ShipDate>2008-01-01</ShipDate>
                <Memo>qserver unit test</Memo>
                <InvoiceLineAdd>
                    <ItemRef>
                        <ListID>F0000-1015877850</ListID>
                    </ItemRef>
                    <Desc>
                    </Desc>
                    <Amount>500.00</Amount>
                    <SalesTaxCodeRef>
                        <ListID>20000-1014853778</ListID>
                    </SalesTaxCodeRef>
                </InvoiceLineAdd>
            </InvoiceAdd>
        </InvoiceAddRq>
        <DataExtAddRq>
            <DataExtAdd>
                <OwnerID>0</OwnerID>
                <DataExtName>Client</DataExtName>
                <TxnDataExtType>Invoice</TxnDataExtType>
                <TxnID useMacro = "TxnID:"/>
                <DataExtValue>Adrian Whatshisface</DataExtValue>
            </DataExtAdd>
        </DataExtAddRq>
    </QBXMLMsgsRq>
</QBXML>
Output XML:
<?xml version="1.0" ?>
<QBXML>
    <QBXMLMsgsRs>
        <InvoiceAddRs requestID="1" statusCode="0" statusSeverity="Info" statusMessage="Status OK">
            <InvoiceRet>
                <TxnID>A3039-1221488056</TxnID>
                <TimeCreated>2008-09-15T10:14:16-05:00</TimeCreated>
                <TimeModified>2008-09-15T10:14:16-05:00</TimeModified>
                <EditSequence>1221488056</EditSequence>
                <TxnNumber>35166</TxnNumber>
                <CustomerRef>
                    <ListID>BA0000-1017848217</ListID>
                    <FullName>Storey Homes</FullName>
                </CustomerRef>
                <ARAccountRef>
                    <ListID>50000-1014927587</ListID>
                    <FullName>Accounts Receivable</FullName>
                </ARAccountRef>
                <TemplateRef>
                    <ListID>80000-1016132419</ListID>
                    <FullName>WM&amp;A payments/credits</FullName>
                </TemplateRef>
                <TxnDate>2008-01-01</TxnDate>
                <RefNumber>1234</RefNumber>
                <BillAddress>
                    <Addr1>Don Storey</Addr1>
                    <Addr2>Storey Homes Limited</Addr2>
                    <Addr3>PO Box 1166</Addr3>
                    <City>Campbellford</City>
                    <State>ON</State>
                    <PostalCode>K0L 1L0</PostalCode>
                </BillAddress>
                <BillAddressBlock>
                    <Addr1>Don Storey</Addr1>
                    <Addr2>Storey Homes Limited</Addr2>
                    <Addr3>PO Box 1166</Addr3>
                    <Addr4>Campbellford, Ontario</Addr4>
                    <Addr5>K0L 1L0</Addr5>
                </BillAddressBlock>
                <ShipAddress>
                    <Addr1>FAX INVOICES</Addr1>
                </ShipAddress>
                <ShipAddressBlock>
                    <Addr1>FAX INVOICES</Addr1>
                </ShipAddressBlock>
                <IsPending>false</IsPending>
                <IsFinanceCharge>false</IsFinanceCharge>
                <DueDate>2008-01-01</DueDate>
                <ShipDate>2008-01-01</ShipDate>
                <Subtotal>500.00</Subtotal>
                <SalesTaxPercentage>5.00</SalesTaxPercentage>
                <SalesTaxTotal>25.00</SalesTaxTotal>
                <AppliedAmount>0.00</AppliedAmount>
                <BalanceRemaining>525.00</BalanceRemaining>
                <Memo>qserver unit test</Memo>
                <IsPaid>false</IsPaid>
                <IsToBePrinted>false</IsToBePrinted>
                <IsToBeEmailed>false</IsToBeEmailed>
                <IsTaxIncluded>false</IsTaxIncluded>
                <CustomerSalesTaxCodeRef>
                    <ListID>20000-1014853778</ListID>
                    <FullName>G</FullName>
                </CustomerSalesTaxCodeRef>
                <InvoiceLineRet>
                    <TxnLineID>A303B-1221488056</TxnLineID>
                    <ItemRef>
                        <ListID>F0000-1015877850</ListID>
                        <FullName>1 to 1</FullName>
                    </ItemRef>
                    <Rate>500</Rate>
                    <Amount>500.00</Amount>
                    <SalesTaxCodeRef>
                        <ListID>20000-1014853778</ListID>
                        <FullName>G</FullName>
                    </SalesTaxCodeRef>
                </InvoiceLineRet>
            </InvoiceRet>
        </InvoiceAddRs>
        <DataExtAddRs statusCode="3150" statusSeverity="Error" statusMessage="There is a missing element: &quot;TxnID&quot;." />
    </QBXMLMsgsRs>
</QBXML> 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-09-16 07:43:34
It looks like the TxnID is missing from the CustomFieldClient addition in the <DataExtAdd> block. What happens if you leave out CustomFieldClient (and it's values) from the Invoice insert? 

  Top 
  thragar 
  
 Group: Members 
 Posts: 11 
 Joined: 2008-05-13 
 Profile
 Posted : 2008-09-18 01:21:27
It works without CustomFieldClient.  I only recently found out I needed to add that into my query.

Thanks for the help. 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-09-18 07:44:45

Ok, then do the INSERT in the Invoice table without CustomFieldClient and run:

SP_LASTINSERTID Invoice

to get the TxnID of the Invocie and then do:

Update Invoice Set CustomFieldClient='Adrian Whatshisface' where TxnID='AB0000-1197756245'

instead.

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to