Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

file locking

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • file locking

    I searched the archive here for this error message which i am getting:

    File locking record count exceeds Max 512

    and it seems to have no solution other than turning off referential integrity which i did. It fixed it. I have some records with a couple of thousand child records attached. Is that the only solution or did i miss a post with the fix.

  • #2
    Re: file locking

    I don't have the experience with A5 to answer this but... the error message refers to file locking... not record.

    I would hope A5 won't grab a record and try to lock thousands of child records... it just doesn't work that way... I hope.

    I would expect (I suppose) a limit to how many files get locked in a session and it seems that's what you're hitting. Now... why? What are you doing that would open that many files... or maybe the same file in a loop?

    Comment


    • #3
      Re: file locking

      Yes that is one of the issues with referential integrity and apparently you have a parent with more than 512 children.....

      You'll find on the messageboard many threads about work arounds. Turn off ref int and build your own delete the children routine.
      Al Buchholz
      Bookwood Systems, LTD
      Weekly QReportBuilder Webinars Thursday 1 pm CST

      Occam's Razor - KISS
      Normalize till it hurts - De-normalize till it works.
      Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
      When we triage a problem it is much easier to read sample systems than to read a mind.
      "Make it as simple as possible, but not simpler."
      Albert Einstein

      Comment


      • #4
        Re: file locking

        Yikes... looks like this issue has been around for years... any reason ever given for the way it is?

        Comment


        • #5
          Re: file locking

          It's a fundamental dbase issue with referential integrity. Who would ever have a parent record with more than 250 children? Not back when this was designed.....
          Al Buchholz
          Bookwood Systems, LTD
          Weekly QReportBuilder Webinars Thursday 1 pm CST

          Occam's Razor - KISS
          Normalize till it hurts - De-normalize till it works.
          Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
          When we triage a problem it is much easier to read sample systems than to read a mind.
          "Make it as simple as possible, but not simpler."
          Albert Einstein

          Comment


          • #6
            Re: file locking

            Hmmm, how about a check register with master record for the account, and a detail record for each check. This could easily run into multiple thousands of detail records.

            Comment


            • #7
              Re: file locking

              Hi Darrell,

              Originally posted by Occam49 View Post
              Hmmm, how about a check register with master record for the account, and a detail record for each check. This could easily run into multiple thousands of detail records.
              I believe the limitation may actually be Windows and/or the Windows file/record locking mechanism.

              You don't really need referential integrity for the case you state above. Referential Integrity basically means that when you lock a parent, it's connected children that have referential integrity on also are locked, keeping others from modifying the children. Also, deletes of the parent cascade down to the children as well.

              For many-to-many relationships (e.g invoice header to invoice line items to inventory), if you locked the inventory record (by referential integrity), no one else could use that part in another invoice until you were done with it, a bad thing.
              Regards,

              Ira J. Perlow
              Computer Systems Design


              CSDA A5 Products
              New - Free CSDA DiagInfo - v1.39, 30 Apr 2013
              CSDA Barcode Functions

              CSDA Code Utility
              CSDA Screen Capture


              Comment


              • #8
                Re: file locking

                Referential Integrity basically means that when you lock a parent , it's connected children that have referential integrity on also are locked, keeping others from modifying the children. Also, deletes of the parent cascade down to the children as well.
                I respectfully disagree. Referential integrity (RI) says nothing about locking or any other implementation specific details.

                Simply RI states that: 1) A parent record with a primary key must exist to create child record where a foreign key is defined in the child referencing the parent primary key. 2)Deleting the parent record implies deleting the children, and 3.) If the primary key in the parent should change, the foreign keys in the related child records must also change.

                Further more, the only data elements of child or parent records under RI constraint are the primary key in the parent, and the foreign keys in the child, all other data elements are free from RI constraint and may be modified. This does not imply that there may be some other reason to lock records, but that is not a RI requirement. In general, file system record locking is a primitive brute force mechanism that results in very poor concurrency performance.

                In my check register example, without RI constraints being enforced by some mechanism, the master record could be deleted leaving orphaned child records.

                [SOAP BOX ON]

                I'm new to A5, and not sure how the A5 native file system is implemented, but it seems to be based upon primitive system level file record [I.e. byte range] locking which will never be able to provide efficient or comprehensive RI enforcement in a multi-user application. The fundamental flaw of file system oriented database systems is that all active user applications have write access to the data on disk. The OS knows nothing about the data semantics, it can only read, write and lock data at the byte level on disk

                A reliable multi-user database system requires a database engine that is separate from the application that is controlling and managing access of all data and enforcing the declarative RI [and other] rules and insuring transaction integrity using an intelligent write-through global record cache and a transaction log. In this scenario, only the engine [normally] ever writes, updates, or deletes data. This is how ALL DBMS systems work. The global LRU cache minimizes reads as multiple users applications may find the data in the cache avoiding an I/O. Frequently accessed data stays in the cache, unused cached data is over written by new requests for data. The transaction log only writes actual changed data to disk in sequential file which is very fast. In a transaction oriented dbms engine, transaction [covering potentially many separate data updates to many records and indexes,etc] either completes as a whole or fails as a whole, greatly reducing the chances of data corruption. The dirty pages in the global data cache is written to disk at check point intervals reflecting many updates to a given page improving I/O effeciency. The previous description is very much simplified, but is part of the essence of engine oriented dbms.

                Using native A5 tables in a busy multi-user environment will ultimately result in data corruption [due to failed multi-table or index writes, or deletes] and poor concurrency performance[due to data locking].

                Even in a lightly used system, the data integrity protection gained by using a database engine is well worth the additional complexity. Ever try rolling back even a days worth of erroneous updates with a file oriented database? Or, how about recovering to the exact point in time of the last committed transaction after a disk crash when you last backup was 24 or more hours ago without losing or re-entering a single committed transaction? I've done both simply and reliably when using Oracle and SQL Server ... now looking at PostgreSQL for use with A5
                [SOAP BOX OFF]
                Last edited by Occam49; 04-02-2009, 02:05 PM.

                Comment


                • #9
                  Re: file locking

                  Originally posted by Occam49 View Post
                  I respectfully disagree. Referential integrity (RI) says nothing about locking or any other implementation specific details.
                  That is correct. I'll restate it to say that Alpha's implementation does.

                  Originally posted by Occam49 View Post
                  Simply RI states that: 1) A parent record with a primary key must exist to create child record where a foreign key is defined in the child referencing the parent primary key. 2)Deleting the parent record implies deleting the children, and 3.) If the primary key in the parent should change, the foreign keys in the related child records must also change.
                  That is correct too. But we are talking about a file sharing system called Windows, not an SQL or similar (although Alpha can now utilize that) using a very primitive structure of dBase II/III/IV.

                  Originally posted by Occam49 View Post
                  Further more, the only data elements of child or parent records under RI constraint are the primary key in the parent, and the foreign keys in the child, all other data elements are free from RI constraint and may be modified.
                  That too is correct, but not practical in an OS that basically allows record locking, but not field locking. It could implement a field lock, but you would see slowdowns probably in an order of magnitude or greater.

                  Originally posted by Occam49 View Post
                  This does not imply that there may be some other reason to lock records, but that is not a RI requirement. In general, record locking is a primitive brute force mechanism that results in very poor concurrency performance.
                  Primitive, yes. Poor concurrency performance, I'd say not. Many people have used Alpha Five with 100 users banging on it constantly using the native DBF and received acceptable performance (although bad coding can bring it to a crawl, as it could any system)

                  Originally posted by Occam49 View Post
                  In my check register example, without RI constraints being enforced by some mechanism, the master record could be deleted leaving orphaned child records.
                  If there was a user accessible lock/unlock function in A5 (which unfortunately there is not), then code could do this, but the typical users of Alpha 5 can't typically do this even if it existed. Easiest way to do this in A5 is to open a set with referential integrity (Alpha's) on, and delete the children

                  Originally posted by Occam49 View Post
                  [SOAP BOX ON]

                  I'm new to A5, and not sure how the A5 native file system is implemented, but it seems to be based upon primitive system level file record [I.e. byte range] locking which will never be able to provide efficient or comprehensive RI enforcement in a multi-user application. The fundamental flaw of file system oriented database systems is that all active user applications have write access to the data on disk. The OS knows nothing about the data semantics, it can only read, write and lock data at the byte level on disk

                  A reliable multi-user database system requires a database engine that is separate from the application that is controlling and managing access of all data and enforcing the declarative RI [and other] rules and insuring transaction integrity using an intelligent write-through global record cache and a transaction log. In this scenario, only the engine [normally] ever writes, updates, or deletes data. This is how ALL DBMS systems work. The global LRU cache minimizes reads as multiple users applications may find the data in the cache avoiding an I/O. Frequently accessed data stays in the cache, unused cached data is over written by new requests for data. The transaction log only writes actual changed data to disk in sequential file which is very fast. In a transaction oriented dbms engine, transaction [covering potentially many separate data updates to many records and indexes,etc] either completes as a whole or fails as a whole, greatly reducing the chances of data corruption. The dirty pages in the global data cache is written to disk at check point intervals reflecting many updates to a given page improving I/O effeciency. The previous description is very much simplified, but is part of the essence of engine oriented dbms.

                  Using native A5 tables in a busy multi-user environment will ultimately result in data corruption [due to failed multi-table or index writes, or deletes] and poor concurrency performance[due to data locking].

                  Even in a lightly used system, the data integrity protection gained by using a database engine is well worth the additional complexity. Even try rolling back even a days worth of erroneous updates with a file oriented database? Or, how about recovering to the exact point in time of the last committed transaction after a disk crash when you last backup was 24 or more hours ago without losing or re-entering a single committed transaction? I've done both.
                  [SOAP BOX OFF]
                  Use SQL. It's more than the typical SOHO market needs, but the great thing about A5v9 is that you can do it all.
                  Regards,

                  Ira J. Perlow
                  Computer Systems Design


                  CSDA A5 Products
                  New - Free CSDA DiagInfo - v1.39, 30 Apr 2013
                  CSDA Barcode Functions

                  CSDA Code Utility
                  CSDA Screen Capture


                  Comment


                  • #10
                    Re: file locking

                    Rolling your own RI is not the worse thing in the world but there should be a warning somewhere that you're out of luck when child record counts grow beyond the maximum if you're using A5 RI. I've not seen that maximum in any literature... including the new grid just released. That's not a lot of records and having 512 child records is not a reason to move to SQL.

                    Comment


                    • #11
                      Re: file locking

                      Hi,

                      Does the above thread still apply today? I am now getting this error message when attempting to amend one specific record. My set consists of a parent table with about six child tables and two grand-child tables. However, none of the child tables have 512 records, though adding the total records from several of the child tables will reach the 512.

                      In any event, is my only remedy to get rid of the RI?

                      Also, is having a few orphaned records a big deal?

                      Many thanks,

                      Larry

                      Comment


                      • #12
                        Re: file locking

                        Hi,

                        Does the above thread still apply today? I am now getting this error message when attempting to amend one specific record. My set consists of a parent table with about six child tables and two grand-child tables. However, none of the child tables have 512 records, though adding the total records from several of the child tables will reach the 512.

                        In any event, is my only remedy to get rid of the RI?

                        Also, is having a few orphaned records a big deal?

                        Many thanks,

                        Larry

                        Comment


                        • #13
                          Re: file locking

                          Have hit this yeards ago and ref int was turned off in affected sets and finally all sets. Built a cleanup script to delete the child records when needed. was run on the delete button in possibly affected forms. I still do that today.
                          Dave Mason
                          dave@aldadesktop.com
                          Skype is dave.mason46

                          Comment

                          Working...
                          X