Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Too many records locked?
Message
De
07/01/2000 15:02:06
 
 
À
07/01/2000 12:42:53
Elyse Pomerantz
Dynamic Data Concepts, Inc.
Brooklyn, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00314581
Message ID:
00314673
Vues:
20
Hi Elyse,

Time for some good old-fashioned code:

Eliminate buffering on the tables. Within the SCAN:

SCAN
IF RLOCK()
REPLACE field WITH data
UNLOCK
ELSE
=MESSAGEBOX("Crap. Can't lock",16,"Replacing")
ENDIF
ENDSCAN

This is the simplest answer. There are other more complicated ways using RLOCK() but this should work for the most part.

>I have some code that SCANs a large number of records in a table and does some stuff with each record, including a REPLACE. On particularly large tables where a lot of records are processed, the server is giving a message that the record lock threshhold has been exceeded and the computer freezes up. Shouldn't the REPLACE command lock and unlock the records automatically? Why would a series of REPLACES cause a problem?
>
>Thanks.
------------------------------------------------
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
Répondre
Fil
Voir

Click here to load this message in the networking platform