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

Keeping users out while posting

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

    Keeping users out while posting

    Hey!

    I have written an application we use here at our work, and it seems to work well. The problem is - the users don't! I pulled an all-nighter the other night because I have one user that thinks the database has to be posted every time she looks at the computer. I am sure I am the only one dealing with someone like this. Haaaaaaaa!

    Anyway ----- I am using A5 v4.5, multi-user, and the posting routine is called by using a button on a form. The problem is, this person is posting and posting and posting while others are in the program trying to work. What happened the other day was she posted (who knows how many times) while another user was entering some vital information, and some sensitive data was lost.

    Is there a script that could be run from the button that will check to see if the databases are open and active and then will tell the user that the databases are currently in use, and not allow the procedure to continue?

    Is there also one that will teach the dangerously intelligent how to be teachable? Haaaaaaa

    Thanks,
    Greg Williams

    #2
    RE: Keeping users out while posting

    Did you try testing for being able to obtain exclusive use of the table/s in question before allowing the post to begin.

    a_tbl = table.open( "tablename.dbf" , FILE_RW_EXCLUSIVE )

    will generate an error if exclusive use cannot be obtained, if I remember correctly.
    There can be only one.

    Comment


      #3
      RE: Keeping users out while posting

      Greg,

      Stan is right about the exclusive test. FILE_RW_EXCLUSIVE will generate an error if a table is open and will lock out other users after it is opened.

      One of the big problems with program design is designing for the distructive intelligent, well meaning end user. (sometimes abbreviated "idiot"). I learned years ago that if it can be done, someone will do it. I have one user who regularly finds new ways to "break" a program. At least 75 percent of the development time I have spent on an application for them is designing ways to trap every possible goofy move. And yet, every so often they find a little hole somewhere and then I get a call "I don't know what happened, but..........."

      I have almost given up trying to train them. I just force them to do it right or lock them out.

      Jerry

      Comment


        #4
        RE: Keeping users out while posting

        You could also do the posting in field rules, then you won't need exclusive access like with a batch post. You also won't need a button on the form for posting, it'll happen in real time. We used to have problem like this in A4v2 but put the posting in field rules in v6. Saved a lot of aggravation and time.

        Russ

        Comment


          #5
          RE: Keeping users out while posting

          unfortunately, i believe that stan's solution does not generate an error for shadowed databases on a network. that's a bug that has been fixed in v5, but i don't think the solution will work in v4 if you use network optimization. you may have to set up a table that keeps track of users as they log in and log out of your application, but if your users just turn off their computers or otherwise fail to follow your logout script, the table will not be updated. alternatively, you can force users off the system before posting by using a method outlined in learn alpha.com.
          i don't know of any easy method in v4 to see if other users are on a shadowed database.

          Comment


            #6
            RE: Keeping users out while posting

            Jerry,

            The only, repeat only, reason it is so hard to design fool-proof software, is that there are so many different kinds of fools.

            Stan
            There can be only one.

            Comment


              #7
              RE: Keeping users out while posting


              Greg,

              Two points jump out at me from your account:

              1) It might be worthwhile to track down the specific reason data was lost. What interaction between your posting script and the concurrent data entry led to this? Once this is understood you might see a way to protect against it in your code.

              2) If your app is dealing with vital, sensitive information, maybe you need both suspenders and a belt in your design. Consider changing the data entry routines so that input from each workstation is stored locally, before it is written to the server. If an update to the shared server fails, the local copy might be used to try again later. Depending on the application batch updates to the server might be a possibility, too.

              -- tom

              Comment


                #8
                RE: Keeping users out while posting

                Greg,

                Does the posting NEED to be performed during the day???

                If not, remove the button and build an application that runs during off hours.

                We do an incredible amount of "batch" processing at night. We do not have th luxury of shutting down our daily operations so that we can perform table and system maintenance.

                One of our nightly routines has over 1100 lines of xbasic code to perform maintenance tasks.

                We created an autoexec application that we call from a schduling program called "launchpad". Launchpad is reasonably inexpensive. It gives you the ability to send keystrokes to whatever application you tell it to schedule. Our autoexec application has 5 or 6 buttons on it and, depending on the date and time, launchpad "launches" the autoexec application, then presses the appropriate button. This system is so good that it even does work on the weekends.

                Alternately, When this person presses the "post" button, check for what time it is, and if it isn't near the end of the day, post a message, tehn exit without posting.

                Tom

                Comment


                  #9
                  RE: Keeping users out while posting

                  The best way to improve any process is to eliminte it!

                  I used to have an application where I had a transaction file and posted to a main file, but after fighting with it for weeks, I realized that I could enter the data directly into the main file using a form that allowed change, but not entry or delete.

                  If you have to post, then write your own routine in Xbasic and update the main file after every entry by making it part of the save button. It will happen very fast and shouldn't disturb the other users.
                  Pat Bremkamp
                  MindKicks Consulting

                  Comment

                  Working...
                  X