puzzling issue

This forum is for general support of Xbase++
Post Reply
Message
Author
BruceN
Posts: 280
Joined: Thu Jan 28, 2010 7:46 am
Location: Slidell, LA

puzzling issue

#1 Post by BruceN »

I have a stand alone EXE that updates a PRODUCTS.DBF file with changes from the main store. The changes file is a DBF file that can be gotten either manually or from an FTP site. Once the file is at the remote store, it searches for the products, if found, replaces the data (with any changes), if not found it adds the product.

Once the changes file is retrieved locally, there is no difference in the code that runs.

When I manually bring in the changes file, all is well. If I FTP the file, when done (and the EXE closes) the PRODUCTS.DBf file remains locked and the main program can't access it. We have to reboot the server to free it up. This makes no sense to me as it isn't even the PRODUCTS.DBF file that is FTP'd. The file isn't even opened until the changes file is obtained locally (either manually or via ftp).

after all the changes to the products file have been made, I have a dbcloseall(), then I display the products that have been changed... and that display is working so the dbcloseall() should have closed the file. Additionally, when the EXE terminates (with a QUIT statement) anything open should close.

Any thoughts?
There are only 10 kinds of people - those who understand binary and those who don't :)

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: puzzling issue

#2 Post by rdonnay »

Do you put a file lock on the PRODUCTS.DBF file?
The eXpress train is coming - and it has more cars.

User avatar
Auge_Ohr
Posts: 1407
Joined: Wed Feb 24, 2010 3:44 pm

Re: puzzling issue

#3 Post by Auge_Ohr »

hi,

try using Directory("*.DBF") and look for F_ATTR if file have some Attribut.
copy / move your DBF from FTP "incoming" to a shared Folder before you start your EXE.
greetings by OHR
Jimmy

BruceN
Posts: 280
Joined: Thu Jan 28, 2010 7:46 am
Location: Slidell, LA

Re: puzzling issue

#4 Post by BruceN »

turned out to be pilot error on my part.... a pathing issue. thanks for the help.
There are only 10 kinds of people - those who understand binary and those who don't :)

Post Reply