cGetFile( )

cGetFile( )

Postby TimStone » 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
User avatar
TimStone
 
Posts: 2904
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: cGetFile( )

Postby nageswaragunupudi » Fri Feb 12, 2021 3: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: Select all  Expand view

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
User avatar
nageswaragunupudi
 
Posts: 10259
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: cGetFile( )

Postby TimStone » Fri Feb 12, 2021 6: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
User avatar
TimStone
 
Posts: 2904
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 15 guests