Author Topic: EndSession Executes correctly but QB won't Quit  (Read 324 times)

chammersley

  • Member
  • *
  • Posts: 11
EndSession Executes correctly but QB won't Quit
« on: June 22, 2017, 05:00:23 PM »
The plugin has been working all day for my client, but QuickBooks won't quit throwing a message that says "The company file cannot be closed because there is another application which is using it...." I just logged in and ran the PCQB_EndSession command, which returned 0, but still cannot get QB to close.

Any suggestions on how to force quit the connection?

Thanks!
Colleen

Geoffrey Gerhard

  • Guru
  • Member
  • ****
  • Posts: 468
Re: EndSession Executes correctly but QB won't Quit
« Reply #1 on: June 23, 2017, 06:56:45 AM »
Hey, Colleen!

There is, unfortunately, no way to close a connection left open by an FMP crash, a phantom disconnect, or other hiccup that leaves QB with an open "connected via the API" flag. Once FMP loses the connection (as opposed to closing it via EndSession or exiting FMP) no amount of OpenSession / EndSession calls will tell QB to drop that original connection flag. Your only option, when this happens, is to use the Task Manager's End Task routine.

Do you know whether your solution is running in the 64-bit or 32-bit version of FMP? The 32-bit version of the plug-in, which only works with the 32-bit version of FMP, is much more resistant (and perhaps immune) to this issue.

Was there any apparent hiccup in the connection? Did the user get an error message or other indication that FMP was not communicating with QB? If the any connection is accidentally dropped, BeginSession will initiate a new connection and QB will accept Requests and supply Responses while ignoring the previous/unterminated connection flag(s) until the user tries to Exit QB.

If you're using the 64-bit version of FMP and do not have any other 64-bit plug-ins or the need to Send Mail via a 64-bit version of Outlook, you might consider installing the 32-bit version of FMP.

If you have no choice but to run the 64-bit version of FMP, I suggest you call Productive Computing and add your voice to those already calling for a speedy fix for this issue.

HTH!

Geoffrey Gerhard
Creative Solutions Incorporated
14000 Creekside Drive
Matthews, NC  28105
704) 814-6852

chammersley

  • Member
  • *
  • Posts: 11
Re: EndSession Executes correctly but QB won't Quit
« Reply #2 on: June 23, 2017, 10:23:22 AM »
Thanks Geoffrey!

64 bit version, so I'll give them a ring.

I believe there was a dropped connection earlier in the day. At that time I suggested a restart of FM... I'll check and see if QB was restarted as well (sometimes you suggest one thing and that gets interpreted as a reboot or restarting all apps). Thanks for the 32bit suggestion!

Colleen

Geoffrey Gerhard

  • Guru
  • Member
  • ****
  • Posts: 468
Re: EndSession Executes correctly but QB won't Quit
« Reply #3 on: June 23, 2017, 12:04:53 PM »
If they tried to restart QB, they'd have gotten the same "...cannot be closed..." message. The BeginSession after FMP restart would have opened a new/separate connection, and things would have looked normal and behaved as expected right up until they tried to exit QB.

HTH!

Geoffrey Gerhard
Creative Solutions Incorporated
14000 Creekside Drive
Matthews, NC  28105
704) 814-6852