Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
INSERT INTO locking mecanism
Message
De
05/09/1997 11:47:34
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00048697
Message ID:
00048726
Vues:
25
>>>I assume you are inserting into a table from an array of many rows. You may need to try testing FLOCK(). If you can lock the table you can insert with no problem.
>>
>>I guess this is what I'll have to implement. This happen more and more that 2 users are creating a Universal Thread message at the same time.
>>
>>First, I'll have to SET REPROCESS TO AUTOMATIC. Then, I'll implement the FLOCK().
>>
>>Here is an example of my command:
>>
>>INSERT INTO TableName;
>> (IDField,Field1,FieldDate,FieldTime);
>> VALUES (lnNewRec,lnField1Value,DATE(),TIME())
>
>This is unusual. You are only inserting 1 record at a time yet still get an occassional collision. I would have thought a reprocess time of 2 seconds would have been more than enough time to insert a record, update a CDX (if any), and unlock the table header. May have something to do with the enormous file size your table must be after a year of UT messages.

Well, I have multiple instances of the Visual FoxPro application on the server. Right now, I have 2 which means, sometimes, I have collision. Also, the mailing list application is using the same command, so we have 3 application. So, collisions do occur.

Yes, the tags need to be updated but this shouldn't take more than 2 minutes, which happened this morning. In fact, if the Web server wouldn't have a 2 minutes timeout, who knows how long it would have taken to execute this command.

As mentioned to Ed, I will start with AUTOMATIC. If I still have the same behavior, I'll add the FLOCK mecanism.

I'm using PHDBase which has a tag on that table. Might it be the problem?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform