Information générale
Catégorie:
Codage, syntaxe et commandes
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement