Author Topic: PCQB_Browse error on open QB file  (Read 1650 times)

pjreagan

  • Member
  • *
  • Posts: 48
PCQB_Browse error on open QB file
« on: September 22, 2011, 01:31:41 PM »
If my users have not already entered a path to their QB company file, I'd like for my script to prompt them for it.  Then I'd like for the script to check the connection.  The problem is that the PCQB_Browse function produces a warning if the company file is open - which would be necessary for the connection to initially be made.  Is this an OS issue?  Is there no way for obtain a path for the open company file?  What else can I try?

Also:  Is there any way to capture if a user cancels out of the browse window?  The PCQB_Browse function doesn't seem to be producing any kind of result in this situation.

What am I missing here?

BTW:  these tests are being done on Win7 / FM11 / FMBC3.0.0.5 / QB2011

pjreagan

  • Member
  • *
  • Posts: 48
Re: PCQB_Browse error on open QB file
« Reply #1 on: September 23, 2011, 11:16:19 AM »
To clarify, the warning is:
  "This file is in use.
   Enter a new name or close the file that's open in another program."

The OS apparently thinks it's being asked to open the file not just get the path.
This also is occurring when trying to obtain the path using Troi File on Win7 but that plugin CAN obtain the path of an open QB file on XP.

pjreagan

  • Member
  • *
  • Posts: 48
Re: PCQB_Browse error on open QB file
« Reply #2 on: September 23, 2011, 07:05:23 PM »
To close out this thread...
'Talked with Kevin at PC.  He was able to replicate this error.  While talking with him it became apparent that I can work around this by having my users open the QB file, allow the first connection to be made then use the PCQB_GetCurrentFileName to get the path to that file.