Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
APPEND FROM DBF() and lossing data...
Message
De
24/09/2002 14:27:15
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
APPEND FROM DBF() and lossing data...
Divers
Thread ID:
00703914
Message ID:
00703914
Vues:
51
I have an application that is a MTDLL on a web site that saves 15 rows of data from a cursor to a permanent DBF table using the following commands:
SELECT table
APPEND FROM DBF('cursorname')
I suppose the code would be better written as follows:
SELECT table
IF FLOCK()
  APPEND FROM DBF('cursorname')
ENDIF
UNLOCK
FLUSH
The other alternative is to loop thru the cursor and do INSERT INTOs as such:
SELECT cursor
SCAN
  SCATTER MEMVAR
  INSERT INTO table FROM MEMVAR
ENDSCAN
I suppose the erradict data loss may be part of a contention issue but I find that somewhat unlikely (but possible) as this is not a heavily trafficed site.

Anyone ever had a similar issue and what is the best solution - APPEND FROM or INSERT INTO?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform