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

Does Alpha Five ignore deleted records by default

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

    Does Alpha Five ignore deleted records by default

    I seem to recall that good old Version 1 required .NOT. DELETED() in all selection filters (queries, reports, forms, etc.).

    I recall working with some geniis in Version 11 that don't offer an opportunity to filter out records marked for deletion.

    Please tell me that marked records are NOT selected anywhere in Alpha Five unless perhaps the user requests "marked" in the filter specifications.

    Thanks to anyone interested in putting this new user's mind at ease.

    --- Sam

    #2
    Re: Does Alpha Five ignore deleted records by default

    Does Alpha Five ignore deleted records by default
    Yes, and not only by default, in every instance. Deleted records can be undeleted but they are otherwise unavailable. Only when the table is packed are they physically removed.

    Marked records are simply marked. If a filter of marked() is applied you will see only marked records. If any other filter is applied, marked records are included if they otherwise satisfy the filter.
    There can be only one.

    Comment


      #3
      Re: Does Alpha Five ignore deleted records by default

      Stan, that is GREAT news!!!

      That's the best thing I've heard on this forum since maybe forever. I was facing the prospect of spending hours upon hours checking and rechecking every form, report, crosstab, operation, query and field rule (what did I leave out?) after I finished converting my old V1 app.

      BTW, my conversion is coming along great, thanks in no small way to all of you who patrol these forums. You've helped me immeasurably. I don't want to name names because so many have helped and I don't want to leave anyone out, but if I were forming an Alphaholics parade I'd try to get Stan as drum major.

      Thanks Stan for your finest post!!

      Sam (Version 1) Gerber

      Comment


        #4
        Re: Does Alpha Five ignore deleted records by default

        Actually some clarification is in order.

        The deleted records can be fetched. They have an asterix in the deleted field (otherwise invisible and blank). The field values of deleted records are intact which makes sense considering that they can be undeleted.

        Just to say that if your code fetches through a table using record numbers, say sequentially, you need to check the record for being a deleted record.

        Example code keyed into the interactive window.

        Code:
        tbl = table.open("smry_glb_trade")
        ? tbl.recno() 'first non deleted record
        = 2
        
        tbl.fetch_goto(1)
        
        ? tbl.DELETED
        = "*"
        
        ? tbl.is_deleted()
        = .T.
        
        ? tbl.Item 'a normal field in the table
        = "Cassava                  "
        
        
        tbl.close()
        There can be only one.

        Comment


          #5
          Re: Does Alpha Five ignore deleted records by default

          Just to say that if your code fetches through a table using record numbers, say sequentially, you need to check the record for being a deleted record.
          Stan, I'm now a tad confused. I never process records by record number. Even with your example above I'm not sure what would happen if I fetched a deleted record and tried to display it.

          However, all I'm concerned about is whether deleted records will remain hidden from all filters in Alpha Five unless they specifically filter looking for "marked" records. Some filters have selection checkboxes called ALL, Marked and Unmarked. I'm assuming that unless you are specifically gunning for marked records they'll never be fetched and enter into calculations and displays.

          Am I right?

          Comment


            #6
            Re: Does Alpha Five ignore deleted records by default

            Marked and deleted are different things.

            Deleted records will never be fetched by any filter. They can be accessed as indicated earlier.

            Marked records are simply marked. Any filter you use will include any marked records that otherwise satisfy the filter. They are not excluded because they are marked. You can, of course, have a filter like

            state = "MA" .and. (.not. marked())

            to exclude marked records where the state is "MA".
            There can be only one.

            Comment


              #7
              Re: Does Alpha Five ignore deleted records by default

              Now I'm even more confused. I used marked and deleted synonymously. Obviously that's incorrect. If you selected a record in A5V1 you have a choice to delete or undelete it. If you chose "delete" is it deleted or not? Is Version 1 any different from Version 11 in this regard?

              I exported the records from the Version 1 tables to ASC and imported them into Version 11. Is the characteristic of "marked" vs "deleted" lost in the process so that V11 will think they're all "unmarked" Should I have packed the V1 tables prior to exporting?

              This distinction between "marked" and "deleted" is unnecessarily confusing. If you pack a table should I assume marked records remain? If so, what's the point in marking them?

              Questions, questions, questions.

              Comment


                #8
                Re: Does Alpha Five ignore deleted records by default

                Sam

                The early versions of Alpha 5 (windows) used the same model as Alpha 4 (DOS) for marked/deleted records.

                The model now used is different. And our thought process of how to use them changes..

                Records can be marked/unmarked as needed without relating to deleted records.

                Deleted records are now internally marked as deleted but are physically left in the table until a pack of the table.

                I think of marking as a filtering process that is available. I can set the marked/unmarked with an operation(multiple records) or with the user interface (single records) with a ctrl-M or ctrl-U

                Deleted records can be undeleted with a right click on the table name - utilities - undelete records

                Just above undelete is nice option to check for duplicate records in a table. It uses the marking/delete ideas together and shouldn't be overlooked by developers.

                While marking is useful in a single user model, it's less useful in a multiple user model.

                undelete.PNG
                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

                http://www.iadn.com/images/media/iadn_member.png

                Comment


                  #9
                  Re: Does Alpha Five ignore deleted records by default

                  Don't know anything about V1.

                  If you delete a record in V3-V11 the invisible deleted field in the dbf is populated with an asterix. This also known as the zeroth field. The physical size of the dbf does not change. When you then pack the dbf all the deleted records are physically removed and can no longer be undeleted.

                  If you mark a record in V3-V11 the invisible deleted field in the dbf is populated with a dash. Packing has no effect on marked records.

                  Not knowing anything about V1 I can't say whether your ASC file contained the deleted records or not. If it didn't then they would not have been imported into V11.

                  This distinction between "marked" and "deleted" is unnecessarily confusing.
                  Only because you are accustomed to different behavior and expect that nothing should ever change.

                  Two different ways of checking the value in the zeroth field.

                  Code:
                  tbl = table.open("zn1")
                  ? tbl.DELETED
                  = "-"
                  
                  tbl.close()
                  
                  
                  tbl = table.open("zn1")
                  fld = tbl.field_get(0)
                  ? fld.value_get()
                  = "-"
                  
                  tbl.close()
                  There can be only one.

                  Comment


                    #10
                    Re: Does Alpha Five ignore deleted records by default

                    Al and Stan, thank you for your explanations. Clearly I've got to forget the phrase "marked for deletion". Very misleading!

                    My intuition tells me the only safe course when porting a V1 table to V11 is to pack it first. That should guarantee that the V11 table that's built has no deleted records. I have no clue whether V1 "marked" records. Guess not.

                    Can either of you tell me how to create a browse that views all "marked records"? Ditto for a browse that will show me all "deleted records"?

                    Comment


                      #11
                      Re: Does Alpha Five ignore deleted records by default

                      Open the default browse, choose the Query menu, Query by expression, enter

                      marked()

                      You can't see deleted records so there's no point trying to browse them.

                      If you want to see how many deleted records there are in a table

                      Right click on the table name in the control panel, choose Properties, select the Statistics tab.

                      Thinking further, if you exported your V1 records to a text file and imported them into a V11 table, none of them will be marked. Not sure how your export would have treated deleted records.
                      Last edited by Stan Mathews; 09-20-2012, 01:55 PM.
                      There can be only one.

                      Comment


                        #12
                        Re: Does Alpha Five ignore deleted records by default

                        If you want to see how many deleted records there are in a table
                        Right click on the table name in the control panel, choose Properties, select the Statistics tab.
                        That's a very neat thing to know. Thanks.
                        Thinking further, if you exported your V1 records to a text file and imported them into a V11 table, none of them will be marked. Not sure how your export would have treated deleted records.
                        My best guess that it will export them. To the best of my memory V1 almost goes out of its way to make deleted records available.

                        Comment


                          #13
                          Re: Does Alpha Five ignore deleted records by default

                          If that's the case they will not be indicated as deleted in your V11 dbf.
                          There can be only one.

                          Comment

                          Working...
                          X