Alpha Video Training
Results 1 to 5 of 5

Thread: File locking error

  1. #1
    Member
    Real Name
    Don Walton
    Join Date
    Mar 2001
    Posts
    123

    Default File locking error

    Am running A5 Beta Build 1170. My client is running 1174 and he still has the problem.

    The attachment is a portion of the operational database where the error occurs.

    Before going on to step 2 CLICK on the Edit/Add cases BUTTON to verify that it does work on smaller cases. CANCEL out to come back to Enter Cases screen and go to step 2.

    To duplicate the error.

    FORMS tab - click on MAIN MENU
    1. Click on ENTER NEW CASES
    2. Click on the button that says "Click here to locate BillTo"
    3. BillTo Find screen popsup - Enter "M" then "U" and down-arrow to Muller Muller Richmond Harms and HIT ENTER
    Back to Enter Cases with MULLER
    Click on Edit/Add cases

    DonW

  2. #2
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,308

    Default RE: File locking error

    Don,

    I've looked at your file twice. It's a complex app.

    Has the Edit/Add Case button ever worked correctly? I ask because you do things differently than I have seen, and I"m wondering if there are simple syntax errors here?

    In order to debug this I recommend you take each piece of the code and simplify it to the extreme and then verify that it's behaving as you expect, by writing messages to the trace window.

    Beyond that here are come comments and questions which hopefully will stimulate a fresh look.

    At one point you establish a pointer to a table in the set upon which your form is based.

    This isn't exact, but it's something like this:

    f = parentform:tables:Billto.this

    later you write a change to a field in the Billto table like this:

    f.tablename->fieldname = "new value"

    I don't this syntax is right. I would use

    f.fieldname = "new value"

    assuming f is a pointer to the table.


    I also don't see an explicit statement closing the called dialog form. This is required, since the form doesn't go away when the user closes it. See Ch 22 of the Xbasic reference Manual for details.

    -- tom

  3. #3
    Former Alpha Employee JerryBrightbill's Avatar
    Real Name
    Jerry Brightbill
    Join Date
    Apr 2000
    Posts
    5,171

    Default RE: File locking error

    Don

    Turn off referential intergrity for the set. This will fix that problem. A simpler way to duplicate is to click the complete checkbox after step 3. You will get a file locking error because of the referential integrity. Beware, this WILL lock your computer. Even CTRL-ALT-Del won't work.

    Tom makes some good points. Your methods to get and use table pointers are a little obtuse, although they do work. There are simpler and more obvious ways to get and use pointers. I have attached your database in a modified form. Check the scripts on the enter cases form to see some possible changes.

    Jerry

  4. #4
    Former Alpha Employee JerryBrightbill's Avatar
    Real Name
    Jerry Brightbill
    Join Date
    Apr 2000
    Posts
    5,171

    Default RE: File locking error

    By the way, A5V4.5 works exactly the same. I created a form using the same set and code on the buttons. If referential intergrity is turned on, you get the same error. The problem is the child summons_id field on the form. This is the child linking field. Whenever you make a change to the parent, the program tries has to lock and unlock each child record. You get an error "File Locking - record count excedds max - 512"

    A simple solution is to remove the field summon_id from the form and replace it with field with a form layout variable. Use the OnFetch event to set the value of the variable to the summons_id. Example on the OnFetch (form layout variable name "keyval"):

    keyval = summons->summons_id
    parentform:key.refresh()

    Jerry

  5. #5
    Member
    Real Name
    Don Walton
    Join Date
    Mar 2001
    Posts
    123

    Default RE: File locking error

    Jerry and Tom

    Thanks for your comments on the file locking problem. I have taken your suggestions to heart.

    DonW

Similar Threads

  1. File locking
    By Roger Evans in forum Alpha Five Version 5
    Replies: 1
    Last Post: 05-12-2004, 09:32 AM
  2. Help! Error file locking record count exceeds 512
    By David LITTLE in forum Alpha Five Version 5
    Replies: 2
    Last Post: 02-18-2003, 06:53 AM
  3. File Locking Error
    By Ronald Frias in forum Alpha Five Version 5
    Replies: 4
    Last Post: 09-05-2002, 10:47 AM
  4. File locking error message
    By David Montgomery in forum Alpha Five Version 4
    Replies: 5
    Last Post: 05-04-2001, 07:06 AM
  5. FILE LOCKING
    By MARC DUVALSAINT in forum Announcements
    Replies: 0
    Last Post: 01-18-2001, 08:02 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •