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

Query options??

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

    #31
    Re: Query options??

    I would agree that it might be slower ... but not slow. Even in a loop, it doesn't seem to be that bad. To me, using lookup() when you can just cuts down on alot of moving parts. I use it a lot in calc fields on my forms and in my reports and have had little issues. I don't mind taking the path of least resistance every once in a while .. :)

    Comment


      #32
      Re: Query options??

      Tom speaks from experience and offers sound advice.

      Choose wisely, grasshopper...
      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


        #33
        Re: Query options??

        Al .... I would never discount Toms experience ... but there are always 2 sides of the coin ... :)

        Comment


          #34
          Re: Query options??

          I'm not sure it is a bug either, only that it did work in V8 and doesn't in V10. When I finally figured out where my script was bombing, I did what Tom suggested, and made a note not to use lookup() in a script anymore, although it sounds like it still works, but has new behavior regarding slots.
          Cole Custom Programming - Terrell, Texas
          972 524 8714
          [email protected]

          ____________________
          "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

          Comment


            #35
            Re: Query options??

            Martin .... did you toss the lookup() and decide not to turn in as a bug because you where unsure of whether or not it was a bug? can you re-create? maybe if we both send something in?? What do you think?

            Comment


              #36
              Re: Query options??

              mine was in a few places, where I am looping through records, and as I find each one, was using lookup() within the loop. I was converting from 8 to 10, and because I was under pressure to get it to work, I just redid the scripts to work as Tom describes.

              will see if I can reproduce and send - but I am no longer using lookup() in any loops and being generally very cautious about using it at all in V10.
              Cole Custom Programming - Terrell, Texas
              972 524 8714
              [email protected]

              ____________________
              "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

              Comment


                #37
                Re: Query options??

                Ok .... I sent in as bug. I just dont feel comfortable saying 'just dont use lookup()' ... its there, it should work ... lets get it fixed or at least explained why its behavior has changed in V10. I will update post with response ....

                Glenn

                Comment


                  #38
                  Re: Query options??

                  Peter, here is a script I just tried, with release 6. The query filds about 125 patients records, and thus uses lookup() 125 times, and the query.filter does not get changed
                  does this script look like it is an adequate test?

                  Code:
                  'this is a dummy script meant to reproduce a 
                  'possible bug or issue where query slots are used by lookup() in recent patches, whereas they were not in early releases, and/or in V8
                  t1=table.open("patients")
                  query.filter=""; query.order=""; query.options=""
                  query.filter="left(lastname,1)='a' .or. left(lastname,1)='w' .or. left(lastname,1)='s' "
                  query.order="lastname"
                  dim shared uid as c
                  idx=t1.query_create()
                  msgbox("","" + idx.records_get())
                  t1.fetch_first()
                  while .not. t1.fetch_eof()
                   uid=t1.Uniqueid
                   temp=lookup("dailyentries","uniqueid=" + quote(var->uid),"uniqueid")
                   t1.fetch_next()
                  end while
                  msgbox("","" + query.filter)
                  t1.close()
                  Cole Custom Programming - Terrell, Texas
                  972 524 8714
                  [email protected]

                  ____________________
                  "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

                  Comment


                    #39
                    Re: Query options??

                    Hi Gents,

                    I thought I would throw out a piece of info that Ira passed along in the course of a conversation at the Alpha Conference a couple of years ago.

                    If you open the LOOKUP table BEFORE your loop - then the lookup command will not open and close the table 125 times as in this code above. Ira said the "lookup" commands are smart enough to know that the table was just opened and will use that pointer. While I prefer the method Tom Cone describes.....I do use the lookup commands on occassion in loops with the methodolgy Ira pointed out....with no problems.

                    So...in this case....just put t2=table.open("dailyentries") before the loop starts. Also, be sure to close it after the loop finishes.

                    Regards,

                    JK

                    Comment


                      #40
                      Re: Query options??

                      excellent info!!
                      Cole Custom Programming - Terrell, Texas
                      972 524 8714
                      [email protected]

                      ____________________
                      "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

                      Comment


                        #41
                        Re: Query options??

                        Thanks Jeff (and Ira) for this nice tidbit of info....spreading knowledge such as this amongst us will undoubtedly enable us to more easily help others (and each other when we forget these jewels if not used for a while!).
                        Mike
                        __________________________________________
                        It is only when we forget all our learning that we begin to know.
                        It's not what you look at that matters, it's what you see.
                        Henry David Thoreau
                        __________________________________________



                        Comment


                          #42
                          Re: Query options??

                          martin, I think your test (example) code in post #38 is different from Glenn's in this particular. His lookups were targeted to the same table that he was looping through. Your lookups are to a different table.

                          Comment


                            #43
                            Re: Query options??

                            thanks Tom,

                            I just retested, given that condition, but the query still remains ok in release 6
                            Cole Custom Programming - Terrell, Texas
                            972 524 8714
                            [email protected]

                            ____________________
                            "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

                            Comment


                              #44
                              Re: Query options??

                              Great!

                              Comment


                                #45
                                Re: Query options??

                                Martin

                                Have you tried your sample with "query.options="T".

                                That was the problem that Glenn was addressing - he did get his app to work with query.options="X".

                                I tested his app with all the other query.options and it did not drop the query. When you add query.options="T", the query gets dropped after the 7th iterations through the loop.

                                Just as information

                                Tom Baker

                                Comment

                                Working...
                                X