Can't add new InvoiceLine to existing Invoice |
Author |
Message |
|
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. |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2006-11-04 11:01:17 |
|
|
|
|
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? |
|
|
|
|
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. |
|
|
|
|
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? |
|
|
|
|
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). |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2006-11-05 20:39:38 |
|
|
|
|
Posted : 2006-11-06 01:10:40 |
|
|
|