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 updating if item is a sub itemSearch Forum

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

 New Topic 
 
 Post Reply 
[1]  
 Error updating if item is a sub item 
 Author   Message 
  tigermain 
  
 Group: Members 
 Posts: 3 
 Joined: 2007-03-24 
 Profile
 Posted : 2007-03-24 21:07:00
I am using QODBC to create orders in Qbooks programatically from a CSV file. My application works fine performing various insert statements, however if make the item a sub item of another I get the following error

ERROR [00000] [QODBC] Error: 3140 - There is an invalid reference to QuickBooks Item \"CAB-USB-AM-AF-3M\" in the SalesReceipt line.  QuickBooks error message: Invalid argument.  The specified record does not exist in the list.

These are the statements (in order) I am using to insert the order. The error is thrown on the final insert line

INSERT INTO salesreceiptline (Customerreffullname, SalesReceiptLineItemRefFullName, SalesReceiptLineRate, SalesReceiptLineQuantity, TxnDate, SalesReceiptLineDesc, BillAddressAddr1, shipAddressAddr1, BillAddressAddr2, shipAddressAddr2, BillAddressCity, ShipAddressCity, BillAddressCounty, shipAddressCounty, BillAddressPostalCode, shipAddressPostalCode, BillAddressCountry, shipAddressCountry, classreflistid, classreffullname, PaymentMethodRefFullName, DepositToAccountRefFullName, FQSaveToCache) VALUES ('99021', 'CAB-USB-AM-AF-3M', 1.95, 1, {d '2006-12-08'}, 'USB A to A 3-Metre Extension Cable', 'Mark Szita', 'Mark Szita', '1 Treleigh Villas', '1 Treleigh Villas', 'Treleigh Terrace', 'Treleigh Terrace', 'Redruth', 'Redruth', 'TR15 1DS', 'TR15 1DS', 'GB', 'GB', '90000-1174503706', 'SpecialTech', 'Cash', 'PayPal', 1)

INSERT INTO salesreceiptline (customerreffullname, SalesReceiptLineItemRefFullName, SalesReceiptLineRate, SalesReceiptLineDesc, FQSaveToCache) VALUES ('99021', 'INT-COUR-PARC', 7.69, 'Interlink Express Parcel 9396153866', 1)

INSERT INTO salesreceiptline (customerreffullname) VALUES ('99021')  

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-03-24 22:25:29

You can use SalesReceiptLineItemRefListID instead of SalesReceiptLineItemRefFullName. If you want to use SalesReceiptLineItemRefFullName, then it must be the FullName, for example Paint Brush:Premier Paint Brush, not Premier Paint Brush.

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to