Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using FOPEN()
Message
 
À
18/03/2003 10:41:20
Todd Brown
Teachers Credit Union
Granger, Indiana, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00767050
Message ID:
00767073
Vues:
12
I assume, that you skip the valid file name in your post, but you do have it in your code.
Instead of FOPEN you may consider another method:

lconerror=on("ERROR")
on error ;
WAIT "Waiting for Current file to become available" WINDOW AT 30,1 TIMEOUT 5

do while alias()#upper(table_name)
use (fullpath(table_name)) EXCL
enddo

on error &lconerror
.... other code goes here



>I have tried to insert the following line into the code at the bottom and it does not work. When I use the actual drive letter it does work. Is there anyway the get it to work without using the actual drive letter. Frequently people are using the files I need, so I suspend the program until it becomes available. Now I do not want to have to actually map a drive to make it work. The FOPEN() command is the only command I have found that will tell me if the dbf is being used before I try to use it .
>
>ImportCurrentFile = "\\dev\backporch\imp_tabs\"
>
>This Works:
>
>ImportCurrentFile = "i:\........\"
>
>SELE 1
>USE CurrentFile
>Handle = -1
>DO WHILE Handle < 0
> Handle = FOPEN(ImportCurrentFile + ".dbf",12)
> IF Handle > 0
> =FCLOSE(Handle)
> ZAP
> APPEND FROM &ImportCurrentFile
> ELSE
> WAIT "Waiting for Current file to become available" WINDOW AT 30,1 TIMEOUT 5
> ENDIF
> =FCLOSE(Handle)
>ENDDO
>
>Thanks
>Todd
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform