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
|
|
ADO begintran and committran |
Author |
Message |
|
Posted : 2007-12-20 01:35:06 |
I am interested in automating journal entry creation using ADO and excel vba. I saw the sample code that does this in two update statements. Can I execute these multiple updates in a database transaction as well? In otherwords I would like to create all the debits and credit updates between begintran and committran statements so that updates are done all or none. Is this supported? I know that connection pooling is not supported by QODBC I am wondering if transactions are supported. Any help is appreciated.
Thanks |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2007-12-20 08:26:43 |
QuickBooks doesn't support begin/end and commit transactions. Some programming environments like Visual Studio 2005 and MS SQL Server 2005 require transaction support, so checking Simulate Transaction Support for SQL Server will turn on fake transaction support, but QODBC still does not support transactions, it will simulate the turning on and off of transactions for you.
Note: When doing multi-line journals, the transaction will only be written if the credits and debits balance. |
|
|
|
|
Posted : 2007-12-21 06:56:22 |
Tom,
Thank you for the info. I noticed the note at the bottom of your posting: When doing multi-line journals, the transaction will only be written if the credits and debits balance.
Just to clarify, this sounds like the behaviour I would like to obtain. Are you saying that, even without the transaction support, QODBC will record a journal only if the debits and credits match? For example, let's sayI have a 6 line journal entry with 4 credits and 2 debits,. I execute first 5 updates ok, but the 6th update statement fails. How do I recover from the first first 5 updates that do not make a good journal entry?
Thank you
|
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2007-12-21 09:24:01 |
If the 6th insert and final journal insert results in the journal being out of balance, then all 6 lines will not be written and you will receive a error message. See: How do I create Journal Entries? |
|
|
|
|