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 Ship Date in Invoice TableSearch Forum

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

 New Topic 
 
 Post Reply 
[1]  
 Error Updating Ship Date in Invoice Table 
 Author   Message 
  Nick G 
  
 Group: Members 
 Posts: 2 
 Joined: 2006-10-25 
 Profile
 Posted : 2006-10-25 01:18:37

I'm having trouble updating the ship date in the invoice table using version 7.0.  The same line of code was working fine with version 6.0 so I'm wondering has somthing changed on Quickbooks or the QODBC function I am using called "curdate()"?

VFP Code:

SQLEXEC(gcHand,"UPDATE invoice SET memo = '"+ALLTRIM(man.trknum)+"',shipdate = {fn CURDATE()}  WHERE refnumber = '"+ALLTRIM(man.invnum)+"'")

 

 

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-10-25 09:51:00

That's interesting, you must have an older version of v6 because if I try any of the below with QODBC v6.00.00.176 or v7.00.00.199:

UPDATE invoice SET memo = 'Shipdate Test', shipdate = ({fn CURDATE()}+430) 
WHERE refnumber = 'Discount 2'

UPDATE invoice SET memo = 'Shipdate Test', shipdate = {d'2008-01-14'} 
WHERE refnumber = 'Discount 2'

UPDATE invoice SET memo = 'Shipdate Test', shipdate = {fn CURDATE()} 
WHERE refnumber = 'Discount 2

I get a  'ShipDate' is not valid for content model:' error:

20061024.160130 I 2616 QBSDKProcessRequest Application named 'FLEXquarters QODBC' starting requests (process 484).
20061024.160130 E 2616 XercesSAXErrorHandler Element 'ShipDate' is not valid for content model:
'(TxnID,EditSequence,CustomerRef?,ClassRef?,ARAccountRef?,TemplateRef?,TxnDate?,RefNumber?,BillAddress?,ShipAddress?,
IsPending?,PONumber?,TermsRef?,DueDate?,SalesRepRef?,FOB?,ShipDate?,ShipMethodRef?,ItemSalesTaxRef?,
Memo?,CustomerMsgRef?,IsToBePrinted?,CustomerSalesTaxCodeRef?,((InvoiceLineMod|InvoiceLineGroupMod))*)'
-- error at line 7, column 143 in XML data.
20061024.160130 I 2616 MsgSetHandler Parser error, finishing.
20061024.160130 I 2616 QBSDKProcessRequest Application named 'FLEXquarters QODBC' finishing requests (process 484), ret = 1.
20061024.160130 E 484 RequestProcessor Process Request error = 80042500, There was an error when parsing the provided XML file.

I have reported the error to the QODBC Software Engineer and will update this post when a response has been received.

 

 

  Top 
  Nick G 
  
 Group: Members 
 Posts: 2 
 Joined: 2006-10-25 
 Profile
 Posted : 2006-10-25 11:14:20

Tom,

Thanks for the response.  To give you an update, I reversed the fields in my statement to update the shipdate field first then the memo field and it worked. 

New statement:

SQLEXEC(gcHand,"UPDATE invoice SET shipdate = "+{fn CURDATE()}+" , memo = '"+ALLTRIM(man.trknum)+"' WHERE refnumber = '"+ALLTRIM(man.invnum)+"'")

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-10-25 13:17:20

Yes, you are correct:

UPDATE invoice SET shipdate = {fn CURDATE()}, memo = 'Shipdate Test'
WHERE refnumber = 'Discount 2'

works too!

The reason behind this has to do with the order of the columns in the Invoice table:

Memo is after ShipDate and you should always structure INSERT and UPDATE statements in the same order as the columns appear in the table.

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to