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
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [email protected]

    I'm going to catch some heat for this, pehaps, but here goes:

    I use indexes sparingly because for me, even in v4.5, they are unreliable. They get erased by some unknown process at times, get corrupted and are just plain cantankerous for me. There are some indexes I cannot avoid using for obvious reasons. So, I make extensive use of queries and eliminate the index problem for the most part. However, in one application, I use an index as part of an LQO. Problem: that index that the LQO is based up frequently needs to be rebuilt, but does not let me know it. If I ignore its integrity, I am likely to have missing records or records that should be missing that are not missing from a query. Is there a way to know if an index has integrity? Is there a way to rebuilt an index prior to its use in a networked situation where many users are accessing the same table, although not likely the same index? For me, this is a major hindrance that I can not overcome no matter what I have tried. I do nightly maintenance on my tables and indexes so they should be good to go each workday. Could there perhaps be pointers to temporary indexes that are causing the problem? Closing and reopening the database does not correct the problem. Rebuildng indexes seems to be the only practical fix that I have been able to perform.

    Perhaps of some signifcance is that the indexes in question contain reference in the filter to logical fields. I have often wondered if a logical field value of "" = .F. on a very basic level. I've found it necessary to evaluate a logical field for the positive boolean only, with the negative boolean being assumed by default if the positve comparison fails. It isn't always necessary, but it does prevent problems from ever occuring when reading the value of a logical field. So, could an index filter also have trouble interpreting the value of a logical field at times?

    Tom Lyon

    #2
    RE: [email protected]

    haha, I forgot my subject! (Index abnormalities)
    Sheesh.

    Tom Lyon

    Comment


      #3
      RE: [email protected]

      Whoops! This entire post may have been unnecessary. I believe I have been in error for years in one basic assumption: A logical field doesn't evaluate the same as a numeric variable in the following sense:

      This will evaluate to true for all values of logicalfield except {null}:
      if logicalfield then
      xbasic stuff
      end if

      This will evaluate to true for all values of numeric_variable except {numermic_variable > 0}
      if numeric_variable then
      more xbasic stuff
      end if

      It appears that when evaluating a logical field, one must explicitly specify .T. or .F. but it appears that isblank("logicalfield") evaluate to .F. nor .T.

      Interesting stuff.

      Tom Lyon

      Comment


        #4
        RE: [email protected]

        I made a typo.
        {
        This will evaluate to false for all values of numeric_variable except {numermic_variable > 0}
        if numeric_variable then
        more xbasic stuff
        end if
        }

        Comment


          #5
          RE: [email protected]

          This will evaluate to true for all values of logicalfield except {null}:
          if logicalfield then
          xbasic stuff
          end if

          This doesn't match with what I've found. I often use that type of script and, as far as I can recall, the results have always been as expected.

          However, I must agree that a {null} logical field can cause some odd results. My standard now is to set a default value for all logical fields.

          Comment


            #6
            RE: [email protected]

            Tom,

            I can wipe out all my indexes at will. I just make a filter ( use a variable as part of it ) and then call it from a form with a similar filter using a button that picks an index.

            Absolutely eliminates all but ONE tag in the index.

            Dave

            Comment


              #7
              RE: [email protected]

              Tom,
              Your post wasn't unnecesasary at all - it gave you an insight! Anyway, FWIW, I use:

              If Logical_Field .T.

              rather than

              If Logical_Field = .F.

              Since, the latter does not always evaluate properly, if the field is null.
              Peter
              Peter
              AlphaBase Solutions, LLC

              [email protected]
              https://www.alphabasesolutions.com


              Comment


                #8
                RE: [email protected]

                Dave,

                Can you elaborate just a bit on that method?

                Tom Lyon

                Comment


                  #9
                  RE: [email protected]

                  I create a global variable in my opening form that identifies a lot to use. When I open my inventory form, it uses that variable as part of the filter so records from other lots are not seen.

                  Like this: lot = var->lotnum

                  I have created a button on the same form to show all the indexes for the inv.set. Most of the indexes are filtered with the same filter and most of those also have filters for active, sold etc.

                  like this: lot = var->lot.and.active="A"

                  After choosing a filter a couple times, all indexes with filters are gone.

                  Dave

                  Comment


                    #10
                    RE: [email protected]

                    Filtering an index on a global variable seems dangerous to me. A5 will drop any index when the expression can not be evaluated. So if any index is opened and the variable hasn't been set, the filter expression won't evaluate and the index will be dropped. I haven't tried it, but defining the variable in the table structure as a global variable might prevent that from happening. If you dim the global later, you could be asking for trouble. I try to avoid filters on indexes where possible, but it is sometimes unavoidable.

                    Jerry

                    Comment


                      #11
                      RE: [email protected]

                      Worse than a filter in an index, is a filter in an index with a variable. If the global variable changes, Alpha will have to rebuild the index. In a multi-user environment, this is nothing but problems. In my mind having a filter on an index with a variable is the same thing as doing a query. I don't think doing this is staying with the strength of the Alpha product.

                      Comment


                        #12
                        RE: [email protected]

                        Hi Tom,

                        Just throwing my 2 cents in here. I have not had the trouble that you speak of with indexes. Prior to version 4.5 you could break indexes, but even then indexes were reliable in most situations. I however, do not use filtered indexes. They have been reported to be problematic, and they are unnecessary in any situation I've encountered. If you need a filtered index, why not use a range instead, or a query on the index. The problem with using queries instead of indexes is speed. If you deal with large numbers of records and are on a network, queries can soon start eating up significate amounts of time (queries that cannot use LQO). However by constructing simple indexes (no filter, single field, etc) you can query on these fields (LQO) very fast, or of course use a range which is extremely fast. I don't know your situation, but my guess is that if you instituted a few changes you'd get along with indexes.

                        Don't use filters on index definitions. Keep the index definitions simple. Keep linking expressions simple. Only create the indexes you need, use queries for seldom used lookups.

                        Good luck,
                        Jim

                        Comment


                          #13
                          RE: [email protected]

                          Jim,

                          Your comments are worth more than 2 cents. I agree completely with your suggestions on the use of indexes, ranges and filters. In Tom's case, I suspect that setting a range based on the variable when the form opens may be the best method, but then I haven't used them since a5v1 so I don't know how well they work in the current version.

                          The only case where I found I can not avoid an index filter is in an odd situation where I link the same child table to a parent more than once. Each link uses a filter. And yes, it is a little unstable although in a5v4.5 it works very well. However, I have a script that can recreate the indexes from scratch with xbasic. On the button that opens a form for this set, a script checks for the existance of the filtered indexes. If they are missing (now a rare occurance) the rebuild script recreates the indexes and gives the user a message. A little complicated, but it stops index problems.

                          Jerry

                          Comment


                            #14
                            RE: [email protected]

                            Jim,

                            Just because I can consistently destroy my indexes does not mean I continue it. I do think it is correctible by Alpha Software and if they don't know it they can't fix.

                            Dave

                            Comment

                            Working...
                            X