Hello Everyone,
I inherited a Clarion Program that when in multiuser environment more than 6 users at the time when adding or updating records into one of the main tables (Btrieve) everybody that its trying to add or update a record as well get hung and the system becomes unresponsive (Deadly Embrase) I would like to use the HOLD(), RELEASE() Statements in a ABC Clarion Form, but I do not find the embed point where to issue the commands. I have been inspecting the code with Stop Statements and I have had no luck. I would like to Find the point where the get(table, key) gets issues and before that issue the hold(table) something like this:
Example:
ViewOrder VIEW(Customer) !Declare VIEW structure
PROJECT(Cus:AcctNumber,Cus:Name)
JOIN(Hea:AcctKey,Cus:AcctNumber) !Join Header file
PROJECT(Hea:OrderNumber)
JOIN(Dtl:OrderKey,Hea:OrderNumber) !Join Detail file
PROJECT(Det:Item,Det:Quantity)
JOIN(Pro:ItemKey,Dtl:Item) !Join Product file
PROJECT(Proescription,Prorice)
END
END
END
END
CODE
OPEN(Customer,22h)
OPEN((Header,22h)
OPEN(Detail,22h)
OPEN(Product,22h)
SET(Cus:AcctKey)
OPEN(ViewOrder)
LOOP !Process records Loop
LOOP !Loop to avoid "deadly embrace"
HOLD(ViewOrder,1) !Arm Hold on view, try for 1 second
NEXT(ViewOrder) !Get and hold the record
IF ERRORCODE() = 43 !If someone else has it
CYCLE ! try again
ELSE
BREAK !Break if not held
END
END
IF ERRORCODE() THEN BREAK END !Check for end of file
!Process the records
RELEASE(ViewOrder) !release held records
END
CLOSE(ViewOrder)
Please Help!!! for what I can see the table its coming already open when the form gets open.
RJ
I inherited a Clarion Program that when in multiuser environment more than 6 users at the time when adding or updating records into one of the main tables (Btrieve) everybody that its trying to add or update a record as well get hung and the system becomes unresponsive (Deadly Embrase) I would like to use the HOLD(), RELEASE() Statements in a ABC Clarion Form, but I do not find the embed point where to issue the commands. I have been inspecting the code with Stop Statements and I have had no luck. I would like to Find the point where the get(table, key) gets issues and before that issue the hold(table) something like this:
Example:
ViewOrder VIEW(Customer) !Declare VIEW structure
PROJECT(Cus:AcctNumber,Cus:Name)
JOIN(Hea:AcctKey,Cus:AcctNumber) !Join Header file
PROJECT(Hea:OrderNumber)
JOIN(Dtl:OrderKey,Hea:OrderNumber) !Join Detail file
PROJECT(Det:Item,Det:Quantity)
JOIN(Pro:ItemKey,Dtl:Item) !Join Product file
PROJECT(Proescription,Prorice)
END
END
END
END
CODE
OPEN(Customer,22h)
OPEN((Header,22h)
OPEN(Detail,22h)
OPEN(Product,22h)
SET(Cus:AcctKey)
OPEN(ViewOrder)
LOOP !Process records Loop
LOOP !Loop to avoid "deadly embrace"
HOLD(ViewOrder,1) !Arm Hold on view, try for 1 second
NEXT(ViewOrder) !Get and hold the record
IF ERRORCODE() = 43 !If someone else has it
CYCLE ! try again
ELSE
BREAK !Break if not held
END
END
IF ERRORCODE() THEN BREAK END !Check for end of file
!Process the records
RELEASE(ViewOrder) !release held records
END
CLOSE(ViewOrder)
Please Help!!! for what I can see the table its coming already open when the form gets open.
RJ