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

Index Mysteries - Why they behave the way they do?

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

    Index Mysteries - Why they behave the way they do?

    Hi All,

    I just had my first instance of having all the index definitions in one table in one of my apps just vanish. I searched the board and found that the most likely reason for this is that Alpha tried to interpret a command that uses the index and it could not resolve it so it JUST DELETES EVERY INDEX DEFINITION in the table!

    This seems like completely BOGUS behavior to me. This is a multiuser app that has been in everyday use for 6 months with 12-15 users and this is the first time that this has happened. Why does Alpha not just give an error (cryptic or not) and go on or crash. Just don't delete every index definition for that table!

    Thank goodness I had purchased Cal Locklin's index rebuild utility. I had the client back up and running in minutes.

    So...just to expand on the subject line. Does anyone else find it annoying that Alpha does things to the indices in your tables without telling you? It annoys me to view the indices for a table and see a new one added that I did not put there(most notably the _A5_record definition that was reported in another post). I follow a naming convention for the indices in my apps and when Alpha randomly adds one it messes with my sense of order and consistency. I would prefer if Alpha needed to add an index that they alerted me instead of just adding it. Let me know that you added the index and give me the option to rename it at least.

    As far as just deleting all the index definitions, I just cannot fathom why this occurs at all. This is akin to me having a field on a form that is required and if the user does not enter a value then my error checking routine to test for the required field would just cancel the record and close the form...thus making the user re-enter all the data again.

    Sorry for the minor rant and tone of this post....but these peculiarities really struck a nerve today.

    Does anyone find Alpha's handling of indices either annoying or do most feel the behavior is ok?

    Just curious....

    Regards,

    Jeff

    #2
    Re: Index Mysteries - Why they behave the way they do?

    I have never had the misfortune to see this occur - yet! However, I'm wondering if this is really an Alpha problem or the CodeBase libraries they use for us to have dbf's. It may also be pointing out continued problems with the dbf structures and perhaps start nudging us towards another db file system. A little Googling and I noticed several messages about dbf index corruption related to user, coding and hardware. So I may be wrong and Alpha can fix this but it may just be a legacy problem in the CodeBase libraries themselves. I'm sure more intelligent minds may contribute to this thread.

    Comment


      #3
      Re: Index Mysteries - Why they behave the way they do?

      Hi Doug,

      Thanks for the reply.

      I'm wondering if this is really an Alpha problem or the CodeBase libraries they use for us to have dbf's.
      I guess that may be a possiblity. Maybe someone from Alpha will chime in.

      I don't really have an issue with DBF stability per se as I have 2 applications I wrote in Foxpro 2.6 almost 15 years ago that still run great. I experienced nearly zero instability issues with Foxpro 2.6...something I cannot say about Alpha. Alpha has it's share of quirks IMHO. That being said, I really like Alpha and the programming efficiencies it offers.....I just wish it was more stable and predictable.

      Regards,

      Jeff

      Comment


        #4
        Re: Index Mysteries - Why they behave the way they do?

        Hi Jeff,

        I experienced nearly zero instability issues with Foxpro 2.6...something I cannot say about Alpha
        Have you (or anyone, for that manner) seen this is in versions prior to V9?

        I'm just wondering if this is another V9 issue only, or if it goes back to prior versions.

        Bob

        Comment


          #5
          Re: Index Mysteries - Why they behave the way they do?

          Hi Bob,

          I have not experienced any of these type of problems in versions prior to V9. That being said, the apps I have deployed in V8 have been less complex than the ones in V9. But, my V8 apps have been very stable.

          I should point out that these index issues(and a few other issues) I am having with V9 do not occur all the time. In fact, they are somewhat sporadic(that is frustrating in itself because it is VERY hard to identify if it is a code issue or Alpha issue). I am convinced the subject of this post is and Alpha issue - there is simply no reason to delete all my index definitions. But, my concern is that the end users get an opinion of the software that it is buggy. I am VERY diligent to quickly fix any problems with my code when they arise but these Alpha issues I cannot do anything about.

          As an aside....I will say for anyone reading this. Pay attention to Ira Perlow's advice on this board to use user defined functions whenever possible. Recently, I have been able to increase stability and "more bullet proof" my apps by paying attention to Ira's constant advice on this board to use functions. While I was using UDF's before for major portions of code - I recently decided to convert more and more scripts to functions (even 10 lines of code on a button on a form are now functions). With the same EXACT script code made into a UDF...I have seen a difference in the "personality" or more appropriately "lack of personality" my apps had in certain places. Just as point of reference for anyone reading this....all of my apps are networked. I am a huge fan of functions these days. :) Plus, there is an increase in programming efficiency as pointed out by Mike Wilson is this thread.

          Regards,

          Jeff

          Comment


            #6
            Re: Index Mysteries - Why they behave the way they do?

            Jeff, when time permits you might create a dummy table and define several indexes. Then define one that can't be evaluated by Alpha and test Alpha's behavior. Previously it was my understanding that only the "defective" indextag would be removed by Alpha. If you can confirm that all are being deleted in this situation I hope you'll submit the sample in a formal bug report.

            The only other way I know to wipe all the indextags is to overwrite the table with an import operation that creates a new table with the same name. Something that dramatic would have other ramifiations. Lost table based forms for example. If anything like that happened when the indexes were lost that might suggest an explanation for what you experienced.

            Hope you (we) can get to the bottom of it.

            -- tom

            Comment


              #7
              Re: Index Mysteries - Why they behave the way they do?

              Hi Tom,

              Thanks for the reply.

              If I get some time I will do as you suggest and try to break things...but time is in short supply these days. :)

              There are no operations in this scenario. The offending piece of code ( I think) that Alpha choked on was its own DBCOUNT() function and the index specified in its use. The index was a simple one field index (no filter, no unique only). That is the part that is frustrating - there was no big complex thing going on. Even if it choked on DBCOUNT() for some bizarre internal Alpha reason, I still see no reason to delete even one index definition. Just give me an error message and bomb - don't change the core of my program without telling me at least.

              Regards,

              Jeff

              Comment


                #8
                Re: Index Mysteries - Why they behave the way they do?

                Jeff,

                DBCOUNT() is pretty quick as functions go but I can imagine that in a networked situation an index using it in the expression could soon cause a problem. When one of the situations occurs that requires updating of the indexes, the expression has to be evaluated for all records.

                Have you determined that the index is necessary and that simply querying, with the dbcount() expression as the order, would degrade the application?

                One might argue that if Alpha allows you to create such an index, it should work. Maybe it is a blessing and a curse that we are allowed to construct things that may not fit into what the programmers intended.
                There can be only one.

                Comment


                  #9
                  Re: Index Mysteries - Why they behave the way they do?

                  Hi Stan

                  DBCOUNT() is pretty quick as functions go but I can imagine that in a networked situation an index using it in the expression could soon cause a problem.
                  Can you explain further why you think this would cause a problem? I cannot see an issue unless DBCOUNT() requires exclusive access and it should have it's own error checking for that if it does.

                  Have you determined that the index is necessary and that simply querying, with the dbcount() expression as the order, would degrade the application?
                  Yep, the index is necessary. I have not tried just running a query to get the record count but it is my understanding that the query would use the same index? As point of reference, the table currently has about 150K records in it.


                  One might argue that if Alpha allows you to create such an index, it should work. Maybe it is a blessing and a curse that we are allowed to construct things that may not fit into what the programmers intended
                  I guess I just do not see why using a function as simple as DBCOUNT in a networked situation should cause a problem. If so, I think Alpha's ability to be a networked app development tool would be in doubt....or at the very least the help file would have to denote which functions could be used in a networked environment.

                  That being said.....this has only happened one time in the 6 months this app has been in service. I think it is incorrect for Alpha to just delete all my index definitions no matter what the cause. Maybe it was just some weird freak of nature thing....or the proverbial crap happens. :D

                  Regards,

                  Jeff

                  Comment


                    #10
                    Re: Index Mysteries - Why they behave the way they do?

                    Jeff, you and Stan seem to be talking at cross purposes. Stan is suggesting it would be problematic to use the dbcount() function itself in the expression defining an index tag. (I think!)

                    Comment


                      #11
                      Re: Index Mysteries - Why they behave the way they do?

                      Originally posted by Tom Cone Jr View Post
                      Jeff, you and Stan seem to be talking at cross purposes. Stan is suggesting it would be problematic to use the dbcount() function itself in the expression defining an index tag. (I think!)
                      Correct. I was trying to point out that an index using dbcount() in the expression would take much more time to re-evaluate for a significant number of records than would a simple field name. In a networked application using it, as records are edited or changed, this index must be updated. I don't know enough about the internal workings to say what has to happen but I can imagine that Alpha could have trouble keeping the index current. Just an opinion.

                      Nothing wrong with an expression using dbcount() for a calculated field, either table or layout level, as this gets evaluated when for the current record, not every record in the table as the index requires.
                      There can be only one.

                      Comment


                        #12
                        Re: Index Mysteries - Why they behave the way they do?

                        Ahhh...I got ya' now. Yep...in that situation I could see issues as well. I try to keep all my indices as simple as possbile - most are just simple one or two field definitions (maybe an alltrim thrown in there as well).

                        Nothing wrong with an expression using dbcount() for a calculated field,
                        Good deal...that is exactly what I am doing.


                        Thanks guys....


                        Jeff

                        Comment

                        Working...
                        X