QBSDK giving error

好久不见. 提交于 2019-12-12 02:22:33

问题


I have been using the QuickBooks SDK (QBSDK) to develop a connection from QuickBooks to a postgres database and then also a connection from the postgres database back to QuickBooks. The data is the customer name and after a huge amount of time, it is all mostly working. From the QuickBooks side I am using the sample EventHandler to get the data and then I call a program to load into the postgres db. On the postgres side I have a NOTIFY/LISTEN as described here with a program going back to QuickBooks. As I indicated, everything works fine except at the end. When my program tries to add the customer name to QuickBooks, It gives the error below indicating that QuickBooks is open. Well, I know it is open, because I opened it and it is running. I want the SDK to just add the name into QuickBooks without giving the error message.

The error is: QuickBooks can't start because it is already running. Only QB Accountant, QuickBooks bookkeeper and QuickBooks enterprise can open more than one company file.

Everything is in C++ except for the postgres LISTEN/NOTIFY. I am using Windows 7, and postgres 9.2. QuickBooks is QuickBooks Pro 2012. If I run the postgres part without QuickBooks running, it adds it without a problem.

So, I know that QuickBooks is running but I just want to have it add the name in the background without the error. Right now it does not add it to QuickBooks . Is there some switch somewhere? Would buying one of those suggested solve the problem? I was hoping to just use the plain QuickBooks instead. Can I use a QBXML to exit QuickBooks, run the customer name addition and then start QuickBooks again? I do not see an XML action that exits the application.

BTW, I discussed the PG part of this here

[EDIT] Also, another problem is if there is a change in Postgres and QB is open, the same error occurs.

Thanks!

Jim


回答1:


It turns out that there is no way to do TWO connections to QuickBooks. You can have only one so the QuickBooks app needs to be shut down when the sdktest app is run. I did not test to see if one of the other QuickBooks apps (QB Accountant, QuickBooks bookkeeper and QuickBooks enterprise ) will work...



来源:https://stackoverflow.com/questions/15721514/qbsdk-giving-error

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!