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 : Deleting records in AccessSearch Forum

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

 New Topic 
 
 Post Reply 
[1]  
 Deleting records in Access 
 Author   Message 
  BBQMemphis 
  
 Group: Members 
 Posts: 2 
 Joined: 2006-04-29 
 Profile
 Posted : 2006-04-29 05:44:12

I am trying to delete invoice records fromthe invoice, invoiceline, and invoicelinkedtrn in microsoft access...

I have created an access table with that includes the invoices I want to delete.  When a do a standard delete query I get a access message telling me unable to delete the from the table...

Thanks in advance for you help

 

Ken

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-04-29 20:02:23

Deletes need to identify the TxnID and TxnLineID values for transactions.

See: How do I delete a Invoice Line in the InvoiceLine table? for more.

 

  Top 
  BBQMemphis 
  
 Group: Members 
 Posts: 2 
 Joined: 2006-04-29 
 Profile
 Posted : 2006-04-29 21:35:27
Thanks Tom for you help.  That will delete the invoice out of the invcoice line table...Do I need to run a similar query against the invoice  and the  invoicelinkedtx?

Also does qodbc support joins in a delete statement?

Example

Delete from  Invoiceline
left join  InvoiceTemp on invoicetemp.txnid=invoiceline.txnid
and on invoicetemp.InvoiceLineTxnId=invoiceline.InvoiceLineTxnID
where
invoicetemp.txnid=invoiceline.txnid
and  invoicetemp.InvoiceLineTxnId=invoiceline.InvoiceLineTxnID

OR would something like this work using qodbc

Delete from Invoiceline where Txnid in (select txnid from invoicetemp)

Thanksk again 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-04-30 17:07:35

No don't do this, there's no DBMS under here so don't do joins or sub-queries unless it's the last resort! QODBC users XML to interface with the Intuit qbXML SDK, so QuickBooks actually does the deleting and takes care of the delete operation - not QODBC. 

You can delete the whole invoice by doing:

delete from Invoice where TxnID='5BAB-1197758658'

or just delete one of the invoice lines by doing:

delete from InvoiceLine where TxnID='5BAB-1197758658'
and InvoiceLineTxnLineID='5BAF-1197758658'

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to