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 : edit sequence is out of dateSearch Forum

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

 New Topic 
 
 Post Reply 
[1]  
 edit sequence is out of date 
 Author   Message 
  Stephanie Allemann 
  
 Group: Members 
 Posts: 8 
 Joined: 2007-06-24 
 Profile
 Posted : 2007-06-24 08:14:02
Hi...

I'm using the VB Demo app to try to get an Update to work... here's the statement:

UPDATE PriceLevelPerItem SET PriceLevelPerItemCustomPrice = 10 where name = 'testing'

I'm getting the Edit Sequence is out of Date error message...  why?

Thanks. 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-06-24 16:34:19

See: PriceLevelPerItem Updates & Inserts 

PS: You should use the Search Forum  link to search for answers first.

 

  Top 
  Stephanie Allemann 
  
 Group: Members 
 Posts: 8 
 Joined: 2007-06-24 
 Profile
 Posted : 2007-06-25 00:48:43
Thanks for your quick response.

Here's what the posting you directed me to says:

To update a PriceLevelPerItem we do this:

UPDATE PriceLevelPeritem SET PriceLevelPerItemCustomPrice = 43.21, PriceLevelPerItemItemRefListID = 'F0000-933272656'  WHERE ListID = '30000-1197755980' AND PriceLevelPerItemItemRefListID = 'F0000-933272656'

Due to a bug in QODBC v6.00.00.155, you need to use PriceLevelPerItemItemRefListID in the WHERE clause, later revisions will only need the ListID to be used in the WHERE clause.

I am running QODBC 7.00.00.214, so I should not have to use the PriceLevelPerItemItemRefListID in the WHERE clause, correct?  If I don't use it, I still get the EditSequence error.  If I do use it, no error.  But, here is what I really need to do:  update the PriceLevelPerItem.PriceLevelPerItemCustomPrice to equal ItemInventory.SalesPrice * ItemInventory.CustomFieldLevel2 (a custom field).  So, I'll need a join to link up the PriceLevelPerItem table with the ItemInventory table.  When doing preliminary testing to try to get an update to work when accessing more than one table, I have been using statements such as (I'll deal with putting the math in after I successfully update while linking tables):

UPDATE PriceLevelPerItem LEFT JOIN ItemInventory ON PriceLevelPerItem.PriceLevelPerItemItemRefListID = ItemInventory.ListID SET PriceLevelPerItem.PriceLevelPerItemCustomPrice = 10 where PriceLevelPerItem.ListID = '80000008-1182618742'


This produces an error saying "Expected lexical statement not found: SET". 


What am I doing wrong?


Thanks for your help.


 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-06-25 08:26:05

QODBC doesn't currently support Update Subqueries like this:

UPDATE Invoice SET CustomFieldContract = (Select CustomFieldContract
from Customer where FullName='Data Access Worldwide')
where CustomerRefFullName='Data Access Worldwide'

or INNER JOIN support with UPDATEs, for example:

UPDATE "Invoice" INNER JOIN "Customer" ON "Invoice"."CustomerRefListID" = "Customer"."ListID"
SET "Invoice"."CustomFieldSchool" = "Customer"."CustomFieldSchool"
WHERE "Invoice"."CustomFieldSchool" is Null

I will add LEFT JOIN to the wish list.

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to