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 : Dynamic Pass-Through QuerySearch Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC SQL Support Forum

 New Topic 
 
 Post Reply 
[1]  
 Dynamic Pass-Through Query 
 Author   Message 
  Don 
  
 Group: Members 
 Posts: 17 
 Joined: 2006-05-03 
 Profile
 Posted : 2007-03-02 11:56:32

Is it possible to create a pass-through query using sp_void that uses a string variable ?

I currently have a MS Access application that programmatically creates a global connection, updates Quickbooks data using various SQL statements and then closes the global connection automatically.

Everything works well, but I'm wondering if I can programmatically void specific transactions.

For example I'd like to use some code like this in a pass-through query:

 SP_VOID FROM Invoice WHERE TxnID =  '" & strTxnID & "'....where I programmatically supply the strTxnID such as A213-1150676913 on the fly.

Is something like this possible ?

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-03-02 13:19:53

Sure, just use SP_VOID just like you would use DELETE. It will void the invoice instead of deleting it. Use:

SP_VOID FROM Invoice WHERE TxnID = 'xxxxx'

or in your case:

DoCmd.RunSQL "SP_VOID FROM Invoice WHERE TxnID =' & strTxnID & '"

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to