Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
COPY FILE problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00492664
Message ID:
00492799
Vues:
10
Hi Daniel,

That was it. I had my datasession confused and was closing in the wrong place. Thanks Much, both of you

Al Allison

>Al,
>Are you sure that my.dbc is really closed? For debugging purpose, try to put a DBUSED("my") before attempting to copy the dbc. I've had situations where a CLOSE DATABASE ALL didn't close all open DBCs. Are you using a private datasession? If you're using a private datasession and my.dbc is already open when you call the form, then a CLOSE DATABASE ALL in the form won't close the open dbc. If this is the case, change the form's datasession to default.
>Just a guess.
>
>>Hi John,
>>
>>Thank you for your reply. The copy is from one .\data\ directory to another on a network machine. My workstations use a local resource file, differently named. In fact, the copy of *.dbf and associated files works OK. The lines that fail are specific filespecs - COPY FILE d:\thispath\data\My.dbc TO d:\thatpath\data\My.dbc and the dcx and dct, just those three files.
>>
>>I can shuffle the copy order and the results are the same. I shutdown all other workstations. I have run the code as methods, separate .prg, shell out to RUN commands, all the same. It works correctly when I run the form in design mode. When I DO MyMain it reads an .ini, logs in, which is checked against MyUsers, which is in My.dbc, but it is then closed, then to the menu where I call the form.
>>
>>This app runs on a LAN, works with a Citrix server, has a few hundred users all day state-wide and has been in production for nearly a year, daily backups and all that, so I don't think it ia permissions or rights issue.
>>
>>It really has me baffled. Thanks for your help
>>
>>Al Allison
>>
>>
>>
>>>Here's a stab in the dark, but if you have SET RESOURCE ON, the FOXUSER files will be active. A blind copy of all DBFs and FPTS will try to copy thse files and generate the error.
>>>
>>>>As part of an archiving process I have a form that receives a destination directory and a time range
>>>>
>>>>I use mkdir() to create the desired directory tree, then COPY FILE ... to move the files
>>>>
>>>>copy .exe version, configs, ini
>>>>copy the dbc, dcx, dct
>>>>copy the dbf, cdx, fpt
>>>>
>>>>when I run the form from the form designer, it all works correctly, when I call it from the application menu the three database files will not copy and give me a file in use error. All of the other files copy correctly without complaint.
>>>>
>>>>I do not have anything in the data environment in the form, nothing is open in any datasession, no database is opened, nothing is used. I CLOSE ALL and so on. wait windows, watch windows, I cannot find anything. Nothing is open
>>>>
>>>>What am I missing??
>>>>
>>>>tia
>>>>
>>>>Al Allison
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform