Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Deleting a record while someone is using it?
Message
 
À
16/06/1998 10:54:40
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00108671
Message ID:
00108695
Vues:
37
>>Hi, >> >>How to deal with deleting a record while someone else is using it undirectly. >> >>Example: >> >>I want to delete suppliers that has no more link to any tables but someone is making a invoice (private datasession, pessimistic buffering) with some of them. >> >>I have two choice for now. >> >>1. When I save my transaction, I will check again if the supplier is there and before deleting the supplier I will check if there is a new transaction when I save. >> >>Pro: Not blocking anyone >>Con: More Validation at saving, annoying for the user if it happen's >> >>2. Open in exclusive the suppliers table and blocking everyone to work with the system for that time. >> >>Pro: Best for keeping the integrity >>Con: Blocking anyone, annoying for the user >> >>I use the suppliers tables but there may be tables that block more/less the system. >> >>Is there any other ways? >> >>Those the RI check for buffering? I don't think so. >> >>Can I check tables involve in buffering even if it's not official yet? >> >>Thank you in advance for your answers >> >>Steve > >You can RLOCK() supplier before deleting invoice. Also, you will RLOCK() supplier before deleting it in another form, so just one of users will go ahead. I was not trying to delete the invoice but ADD it (no link yet). Of course, but I have "utilisation code" table that the user can modify. In another table, I got 3 field wich contain the utilisations. So, when I edit/add, I would have to lock each field that has a table link to it. I'm searching for a method standard for the whole system. What would you do then? Steve
Lead programmer of the free MIS Info Video(Frontend/player), Info 2 MIS or visit me at Steve's Tech Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform