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 : Can't add new InvoiceLine to existing InvoiceSearch Forum

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

 New Topic 
 
 Post Reply 
[1]  
 Can't add new InvoiceLine to existing Invoice 
 Author   Message 
  Cindy Merkin 
  
 Group: Members 
 Posts: 9 
 Joined: 2006-11-02 
 Profile
 Posted : 2006-11-04 02:45:54

I'm trying to integrate Portable Technology Solutions' TracerPlus with QuickBooks via ODBC via QODBC (v7.00.00.199).  I've seen the posts here regarding inserting an InvoiceLine using an existing TxnID field value as the key ... so that's what I'm trying.  Unfortunately, the message I'm receiving from the PTS TracerPlus program (via QODBC) is that the TxnID "Field not allowed on update".  I'm attempting to insert a record with the TxnID, InvoiceLineServiceDate, InvoiceLineItemRefFullName, InvoiceLineQuantity, and FQSaveToCache fields; with FQSaveToCache set to 0.

Following is a clip from the QODBC trace file around the error; any help is much appreciated.

SetParameterValue
    Char Parameter Id: 1 Value: [1C0A-1162500360]
SetParameterValue
    Char Parameter Id: 2 Value: [786676362054]
SetParameterValue
    Numeric Parameter Id: 3 Value: [1.00000]
SetParameterValue
    Date Parameter Id: 4 Value: [2006-11-03]
SetParameterValue
    Integer Parameter Id: 5 Value: [0]
ISAMInsertRecord
    0x04A9C7E8 [ISAM]
    0x0575BFC8 [InvoiceLine]
    NO_ISAM_ERR 00000 00000
ISAMPutData
    0x04A9C7E8 [ISAM]
    0x0575BFC8 [InvoiceLine]
    COLUMN: 0 [TxnID]
    SQL_C_CHAR
    1C0A-1162500360
    ISAM_FIELD_NOT_ON_INS S0000 00000 [QODBC] Field not allowed in insert.
ISAMGetErrorMessage
    0x04A9C7E8 [ISAM]
    S0000 00000 [QODBC] Field not allowed in insert.

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-11-04 11:01:17
You sent me everything but the actual SQL statement that fails. Try looking at the Plan B technique shown at: Using ClassRefListID when inserting invoice lines again and then tell me what doesn't work. 

  Top 
  Cindy Merkin 
  
 Group: Members 
 Posts: 9 
 Joined: 2006-11-02 
 Profile
 Posted : 2006-11-05 00:57:35
I don't have the SQL statement since it's a program (PTS's TracerPlus) that's talking ODBC to the driver, just the output of the QODBC trace file.  It's sounding more and more like I'll need to write some custom "glue" to make this work; would it be possible to get the source code for either the C++ or VB demo software to give me a leg-up? 

  Top 
  Cindy Merkin 
  
 Group: Members 
 Posts: 9 
 Joined: 2006-11-02 
 Profile
 Posted : 2006-11-05 01:44:09

OK, I found the SQL statement in the QODBC trace and tried it on the VB Demo command line with the same results:

INSERT INTO "InvoiceLine" ("TxnID" ,"InvoiceLineItemRefFullName" ,"InvoiceLineQuantity" ,"InvoiceLineServiceDate" ,"FQSaveToCache" )  VALUES ('1C0A-1162500360', '786676362054', 1.00, {d'2006-11-03'}, 0)

This request results in the "Field not allowed on update" message.  I've verified that the TxnID value is correct and that the ItemFullName is registered in QB.

 

  Top 
  Cindy Merkin 
  
 Group: Members 
 Posts: 9 
 Joined: 2006-11-02 
 Profile
 Posted : 2006-11-05 02:07:05
Could it possibly be that the version of QuickBooks Pro I'm using (2002 US) doesn't support the InvoiceLine insert? 

  Top 
  Cindy Merkin 
  
 Group: Members 
 Posts: 9 
 Joined: 2006-11-02 
 Profile
 Posted : 2006-11-05 08:22:49

OK, I bit the bullet and bought a copy of QuickBooks Pro 2007 ... and I can now add InvoiceLine records to existing Invoices.  I don't know if the problem was due to limitations of QB Pro 2002 or if it was that I was running QODBC v7.00.00.199 with that older version of QB.

Thanks for your help ... I'm on to the next problem (and would still appreciate a copy of the source code to either the C++ or VB demo program to speed my development timeframe up).

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-11-05 20:39:38

QODBC has only very limited INSERT abilities with QuickBooks 2002. That was your problem. Here are the links you asked for:

Visual Basic ODBC Demo Program 32 bit Source Code (35k)
http://www.flexodbc.com.au/downloads/vbsrc32.zip

C++ ODBC Demo Program Source Code (32k)
http://www.flexodbc.com.au/downloads/cppsourc.zip

We have modifed VB Demo for QODBC, but the basic code is in the link above.

 

 

  Top 
  Cindy Merkin 
  
 Group: Members 
 Posts: 9 
 Joined: 2006-11-02 
 Profile
 Posted : 2006-11-06 01:10:40
Thanks a bunch, Tom. 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to