Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
File Locking
Message
De
10/12/1999 09:09:24
 
 
À
10/12/1999 07:56:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00301584
Message ID:
00301621
Vues:
28
Hi Chris.

Are you trying to use APPEND FROM to append data from the network tables? Hmmm...OK, two things. Is SET EXCLUSIVE OFF? It should be. Second, if you have no way of knowing if the network tables are in use by another process, the safest way to do your append may be to open the network table for shared access, copy it to a cursor, and APPEND FROM the cursor. As in:

USE networktable IN 0 SHARED
SELECT * FROM networktable INTO CURSOR foo
USE IN networktable
SELECT localtable
APPEND FROM foo

>I have an application that sits on local user's machine and, upon a button click, updates data by zapping a set of local files and appending from a set of files on a network - files that were placed there ny another process.
>
>Occassionaly the process fails because - for whatever reason - the user gets a "file access is denied" on one of the appends. Is there a way to test the availiability of the file before doing the append? As i read it flock() only locks a file you have already_ successfully opened. Hoe can I look at the file and tell if the append will work?
>
>
>TIA
>Chris
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform