cGetFile( )

Post Reply
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

cGetFile( )

Post by TimStone »

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
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: cGetFile( )

Post by nageswaragunupudi »

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

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
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: cGetFile( )

Post by TimStone »

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
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
Post Reply