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

Storing data in global variables

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

    Storing data in global variables

    Is it a good practice to load a lot of data in to global variables when the application is started in order for it to be available for constant data entry instead of always using the lookup (the data is always the same stored in a table with a single record only), or would it be a burden to the application,

    Thank you,
    Daniel Weiss
    Daniel Weiss
    EZ Link Software

    #2
    RE: Storing data in global variables

    This is a useful technique, which I regularly use.

    However 'a lot of data' might make it unwieldy, depending on what your phrase means. For example, it would not be practical to store the contents of the Encyclopedia Britannica in a series of variables on startup, just so they'd be available instantly later on.

    -- tom

    Comment


      #3
      RE: Storing data in global variables

      Daniel,

      I do store some data in global variables when leaving my startup screens. This is only data that I will constantly use throughout the open session. Variables take up a very small amount of space and are quick, but can get out of hand if tooo many are utilized.

      Dave

      Comment


        #4
        RE: Storing data in global variables

        Hi David,

        I have a similar situation in a dues paid application. The user enters
        600 to 1000 records for each member every month. There are 6 fields to
        be filled for each record, 3 of them are date fields the other 3 are
        numeric to enter how the dues is distributed in 3 different accounts.
        What I do is in a form just prior to the form where the records are
        generated I set the defaults for 4 of the fields, because those 4 are
        the same for 95% of the records to be entered. Then uses sys_send_keys
        to tab thru the fields that have defaults leaving the user to only
        have to make 2 entries in the remaining fields. Hence the user checks
        all of the records to be entered on her checkoff sheet and then breezes
        thru all of them really quick. After all of the similar records are
        entered then the last 5% go much slower but still routine and goes
        quickly due to the meager number of records left to be entered. The
        form that sets the defaults uses ask vars to set the default value.
        A button then takes the user to the dues_entry form to make the entries. A button on the dues_entry form takes her back to the form to change defaults
        when needed. This up grade from A4 to A5 has shortened dues entry from
        2 days to about 4 hours. It could be easily adaptable to your
        application. Another feature on the dues_entry form which is on a set
        of members-dues_entry is, configuring F3 so that when dues_entry is
        entered it will send the focus directly from the members region to the
        first field of the dues_entry where sys_send_keys breezes straight to
        a field where manual entry is required. When the last field of the
        record is filled, F3 takes her back to the members region and advances
        her to the next member. This thing runs as smooth as milk down a babies
        throat. Tom Cone was a tremendous help in developing this technique.

        Give it some thought,
        efs

        Comment


          #5
          RE: Storing data in global variables

          Another useful option when you have a lot of data that is common for many records, is to create a table with the data. In many of my apps, I store company specific information and other "stuff" like default form colors, startup indexes, registration numbers, etc in a table. At startup, some of this data is sent to global variables. Usually this is data that will be used repeatedly thoughout data entry or for multiple forms. Other data that is used less frequently is looked up from the table when needed.

          One nice thing about doing it this way is that I can save the global variable values back to the table so they will be the same when I open the app the next time.

          I use a lot of global variables in some cases. Rather than define them in forms and tables, I have a script that is run by an autoexec script that loads all of them at startup. If I find I need a new one, I add its definition to the startup script. In this script I also usually set a default value for each. Once the variables are loaded, accessing them is much faster than using a lookup.

          Jerry

          Comment


            #6
            RE: Storing data in global variables

            Daniel,

            Good question; as you can see the debate continues...

            I use a lot of global variables (200+), which are loaded from my autoexec script whenever I launch my application. They don't take up that much room, are very fast and, as a result of having these things "at my beck and call", I can bring them into an operation anytime, anywhere...

            The most useful criterion I have found for variables is to use the most restricted level possible that still serves your purpose. If it's just used for one thing one time, keep it constrained to the script, and so forth.

            It's also true that you can save a lot of things to an "internal" table for subsequent recall. I use that technique as well, but mostly for those things which must stay persistent when the application has been closed and reopened again (e.g. saving the path to the last file opened by the application).

            Incidentally, when I want to use memory variables in objects such as a form or report, I like to have them globally defined before I begion to work in design mode. That way I can just use them as I would any other readily available field.

            Hope this is useful.

            Regards,

            Geoff Hollander

            Comment


              #7
              RE: Storing data in global variables

              Thanks All for your responds

              Actually what I was referring to; is I have a table where my clients can enter in the data, which is used for 5 e-mailing types (when the order is received, when the order was shipped, etc.). See sample below
              The data the client enters is used for the standard text in the body of the Email (header, footer, etc). The table holds about 6000 characters between all the fields, the table has only one record and the client can only make changes to that record they cant enter a new record or delete it.
              I have a scheduled script, which run every 20 minutes as follows

              Checks for new records or for change of status of the record

              Enters a new record in a table that has 4 fields 1) inv # 2) a memo field 3) E-mail address 4) logical filed, the memo filed is the body of the E-mail

              The memo filed is gathered using the header data entered in the E-mail setup table and from necessary fields in the invoice header table and the line items from the invoice items table and the rest of the data from the E-mail setup table.

              Next, it appends the new records to an Access table (.mdb), which is attached via ODBC to my database
              Marks the records as appended so it won�t append it again

              Last, it calls an EXE file (sys_shell) written in Visual basic6, which E-mails all new records in the mdb file-using Outlook to the E-mail address on each record. The EXE. File then marks the records in the mdb file as send.

              All this is done on the background of the server without interrupting the users.

              My question is if should load the data from E-mail table when the application is started or locally each time the script runs. I think in this case it would be better to do locally, or am I wrong?

              Below is a sample of an E-mail the system sends after shipping
              It is possible the line wont show correctly here but in an E-mail it works real nice


              Dear Daniel Weiss,

              We would like you to know that we shipped the item(s) you ordered on June 12, 2001, Please allow 12 hours for the tracking information to be available on the shipper's Website.

              Order Number: I1005091

              Qty Item Price
              1 NIKON COOLPIX 880 DIGITAL CAMERA $1,351.00
              1 EH-21 AC ADAPTER/CHARGER F/ COOLPIX 880
              1 EN-EL1 LITHIUM RECHARGEABLE BATTERY F/CP880
              1 COMPACT FLASH USB PORT CARD READER
              1 64 MB COMPACT FLASH HIGH SPEED MEMORY CARD
              1 CASE- POINT AND SHOOT SMALL

              Shipping and Handling $20.00
              Total Amount $1,371.00

              * If this is a partial shipment, your other items will ship separately, as soon as they're available, and tracking information will be e-mailed to you. Despite the separate shipments, rest assured that your total shipping charges for this order will not exceed the amount we originally promised.

              This shipment was sent to:
              Alpha Software Inc.
              83 Cambridge St.
              BURLINGTON, MA 01803
              USA

              Via UPS
              Tracking Number: 1ZA7V4160348839350

              Should you have any questions or problems when you receive your order, please contact us at:
              www.foreigndesigns.com

              Thank you for shopping with us, and we hope to see you again soon.



              Thank you again,
              Daniel Weiss

              Daniel Weiss
              EZ Link Software

              Comment


                #8
                RE: Storing data in global variables

                I see the forum striped all spaces in the line items columns but on the E-mails I checked it put the Quantity in the left column then the Item and in the right column the amount

                Daniel
                Daniel Weiss
                EZ Link Software

                Comment


                  #9
                  RE: Storing data in global variables

                  .
                  Daniel Weiss
                  EZ Link Software

                  Comment


                    #10
                    RE: Storing data in global variables

                    Sorry, not quite sure how you are using variables. If you already have the data in a table, why move it to variables?

                    One thing that is very important to remember in networked apps is the "extent" of the data. Table data is the same for everyone since all normally access the same table on the "server". Global variables are resident in memory and exist on the local computer so their value can be different for each user. Is this what you need to know?

                    Jerry

                    Comment

                    Working...
                    X