INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Exclusive Record Access

Exclusive Record Access

(OP)
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(Pro:Description,Pro:Price)
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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close