Home > Archive > FoxPro database connector > April 2005 > Begin Transaction & End Transaction









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Begin Transaction & End Transaction
Debbie

2005-04-07, 8:05 pm

I have a problem deleting records during a Begin and End Transaction.
Basically this is what is happening:

If User1 is viewing a record in MYTABLE at the same time that User2 runs a
procedure to delete a batch of records from MYTABLE then all the records get
deleted except for the one that User1 was looking at. I have tried
including the following code, but it makes no difference!

SELECT mytable
SCAN
IF EXP1 = EXPR2
DO WHILE !RLOCK("mytable")
LOOP
ENDDO
DELETE IN mytable
TABLEUPDATE(0,.T.,"mytable")
UNLOCK IN mytable
ENDIF
ENDSCAN

Could someone please tell me where I am going wrong?

Many thanks - Debbie



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com