Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using FOPEN()
Message
De
18/03/2003 11:13:18
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
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:
00767083
Vues:
13
>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

Todd,
UNC pathnames too do work. Sounds like you have a typo in your code, couldn't see filename. When it fails check ferror() for the cause, I believe it's 'File doesn't exist'
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform