FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour cGetFile( )
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
cGetFile( )
Posted: Fri Feb 12, 2021 12:31 AM

A quick question:

Consider the following line of code: cQBFile := cGetFile( "QuickBooks|*.QBW", "Select your Quick Books Company file")

In the past it would give me the link to the file. Something changed ( likely in Windows ). However, Windows pops up a box that informs me the file is in use by another program and I need to close it or select another file. I cannot close it because it must be open in order to setup the QBFC interface between my application and QuickBooks.

I'm trying to update some old code that no longer works ... and I suppose there is a flag I need to set to allow me to grab this file. IN Quickbooks, it is already set in multi-user mode so this should be allowable.

Your thoughts will be appreciated.

Tim

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: cGetFile( )
Posted: Fri Feb 12, 2021 03:07 AM
This message indicates that the file is already open "exclusively" by another application or even by our own application.

IN Quickbooks, it is already set in multi-user mode so this should be allowable.


Even then, if any application already opened the file in exclusive mode, we can not open it again.

Consider this simple example
Code (fw): Select all Collapse
USE STATES NEW EXCLUSIVE
USE CUSTOMER NEW SHARED
cFile := cGetFile( "*.dbf|*.dbf|" )

In this case, cGetFile() function allows us to select customer.dbf but not states.dbf.
Regards



G. N. Rao.

Hyderabad, India
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: cGetFile( )
Posted: Fri Feb 12, 2021 06:54 PM

I realize why the error is occoruing ... I will try a different post regarding the issue.

My question was to find a different way to just get the file name, not to open it.

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit

Continue the discussion