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

Automatically update the Shadow Database

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

    #16
    Re: Automatically update the Shadow Database

    Not for the faint of heart.

    The databasename.alb is a table.
    The databasename.alx is the index for that table.
    The databasename.alm is a memo file associated with that table.

    If you copy those three files to a different/empty directory and change the extensions.

    databasename.alb -> databasename.dbf
    databasename.alx -> databasename.cdx
    databasename.alm -> databasename.fpt

    create a new database in that new directory and add the databasename.dbf to the new database. You can then browse the table and edit as shown.

    When you've done that you can rename them (or copies of them) to the original names and copy back to the original directory.

    Backups first are only sensible.
    There can be only one.

    Comment


      #17
      Re: Automatically update the Shadow Database

      Perfect. Exactly what I wanted to know, which only leads me to my next question :)

      The ext. difference(s).......
      databasename.alb -> databasename.dbf
      databasename.alx -> databasename.cdx
      databasename.alm -> databasename.fpt

      I found the file types here.... http://alphafivewiki.com/Alpha+Five+File+Types
      I thought I understood the differences although am curious how .alx converts to .cdx?

      Comment


        #18
        Re: Automatically update the Shadow Database

        Not sure what you mean by how.

        Alpha Five uses the .ALX file to find a specific script, function, operation, setting, etc. that is stored in the data dictionary.
        Alpha uses indexes to find things.


        You will have noticed also that.

        tablename.ddd -> support_tablename.dbf
        tablename.ddx -> support_tablename.cdx
        tablename.ddm -> support_tablename.fpt

        If you want to investigate these you would also have to copy to another directory to avoid overwriting the tablename itself.
        There can be only one.

        Comment


          #19
          Re: Automatically update the Shadow Database

          I said How just because at this point I am still not seeing the correlation between the file types. I am sure it is a basic concept and I am waiting for the light bulb to come on for me but it has not yet.

          I am still unclear as to what makes a .ddd file correlate (if that is the right term) to .dbf, .ddx to .cdx, etc.

          Comment


            #20
            Re: Automatically update the Shadow Database

            Alpha stores the support information for a table in a table.

            The three support files for mytable.dbf, are mytable.ddd, mytable.ddx, mytable.ddm. Those three files are actually a table, its index, and its memo file with extensions that don't compete with the real table, index, and memo file.

            So if you copy the support files to a different location, change the extensions, and browse the dbf you are viewing the support table.
            There can be only one.

            Comment


              #21
              Re: Automatically update the Shadow Database

              Originally posted by Scott Kurimski View Post
              Stan,

              I definetly don't want to force a refresh unless I need to (to time consuming). Users open the app many times a day. I have a routine now that set the app version and the runtime checks the version by defualt. If it requires an update I want it to automatically update the runtime/shadow rather than wait for the user to click "OK". Looks like the option Scott E. mentioned would work if I could just figure out where the value is stored.
              I have to say I find this whole thing baffling. What on earth could be the big deal with the user having to click "OK"?

              But hey, to each his own, I guess, which brings me to why on earth would you want to regularly (and foolishly!) tinker with DB files when you can just do what Peter suggested in post #5 above?
              You don't need to use Alpha's numbering system if you want to control it yourself. Keep your version no in a text file and check against that.
              Then in your autoexec simply check that the value set in that file against your A5_getAppVersionNumber() and if they don't match, a simple Action Script would produce code that will run the update automatically without the (hideous?) "OK".
              Code:
              'Refresh the current Shadow database. You can only execute this Action if you are currently in a Shadow database.
              'Determining if the current database is a Master or Shadow database. Only run command if in a Shadow database
              if a5.Get_Master_Path() <> "" then 
              	addin.run("Refresh_Shadow")
              end if
              If you don't know how to set and then check a text file value against A5_getAppVersionNumber(), then you clearly have no business tinkering with the DB files--and I am sure Peter would help with how to set and check the text file value.

              Raymond Lyons

              Comment


                #22
                Re: Automatically update the Shadow Database

                Ray,
                What on earth could be the big deal with the user having to click "OK"?
                It's Easy, It is all about timing.

                Maybe in your environment it's no big deal but you need to consider the fact that in other environments it may just be important. I know a conversation on this topic could be endless because of all the potential scenarios/variables in each environment but in reality the forum is for learning / information sharing.

                In our case the app opens by default and when a new version is detected it "sits" waiting for someone to click "OK" basically forcing the first user to stand and wait while the apps updates. Our app is fairly large and takes between 2-3 minutes to update. When an operator only has a minute or so to get something done, this causes a problem for the first operator who uses it after an update.

                In my opinion "tinkering" is how we all learn and getting advice from others who have previously tinkered is a great thing and is one of the best things that come from a forum.

                I appreciate your feedback but not the sarcasm, just keep in mind we all do things different and if it irritates you to answer the question because in your environment it does not make sense or it is not the way you would do it, just don't answer the question.

                Comment


                  #23
                  Re: Automatically update the Shadow Database

                  Stan was the one who first used the word "tinker" but yes my additional sarcasm (if that's what it is) was unnecessary and I do apologize.

                  Still, I strongly suggest that you go down the road Peter and I have suggested rather than trying to directly change the DB files (it's much easier and less "dangerous").

                  Also, I think it may have helped if you had gone into more detail about the issues in your environment that make the "OK" such a negative. In fact, I still don't fully get it. I happen to have an app that gets started automatically when a workstation's user clicks a button in another program, but when that happens the user is always right there anyway and would have to wait for the refresh whether or not an "OK" were needed. Are you saying your app starts up when the user is not around? Or perhaps you want refreshes to happen only once a day (if needed), say in the middle of the night when no one is around?

                  Anyway, good luck and again, I apologize.

                  Raymond Lyons

                  Comment


                    #24
                    Re: Automatically update the Shadow Database

                    I appreciate your apology although it was not necessary. Sometimes really good information comes from healthy frank discussions :)

                    In reality I am not looking to modify the database files in this case although continued to ask Stan about it because I am learning a lot from it and him. In my opinion, the DB information is very good to know and provides me (and others) a little understanding of the under-pingins of Alpha which, personally, if "I know how it works" allows me to learn much faster.

                    I try to leave out most mundane details and keep my questions more technical when posting (as much as I can). Over the years I have learned if you include to much information the post sometimes get overlooked because they require more time involvement.........now out of the other side of my mouth........yes, I have also found that by including more detail sometimes I get more direct and detailed answers.

                    Now to answer to answer the question........"How much detail to include?".......I don't know.......I just appreciate everyone’s help!!

                    I typically use the 80-20 approach. 80% direct, 20% indirect (if that makes sense).

                    To answer your questions.....
                    Are you saying your app starts up when the user is not around?
                    Yes, some of the runtime PC's are in a shop environment and the PC's restart and relaunch the app automatically daily. "Typically" the first shift supervisor walks up to the machine (while getting inundated with questions first thing in the morning) tries to use the app but has to click "OK" and wait for it to update.

                    Another scenario......I periodically release updates throughout the day. Thinking ahead….it would be nice to have the app automatically refresh when the “PC” is in active for X number of seconds. I started working on a solution for this previously be unfortunately did not have time to continue it yet. The idea was basic……..have an ontimer event checking the mouse and keyboard inputs, if they have remained untouched for X number of seconds check for an update to the app.
                    Last edited by Scott Kurimski; 06-07-2011, 04:16 PM.

                    Comment


                      #25
                      Re: Automatically update the Shadow Database

                      What on earth could be the big deal with the user having to click "OK"?
                      They know it takes time to update from past experiences. I changed a computation that was critical and one user did not wist to click ok. all his figures were wrong. He did learn when he had to do them over, but cost the company and him some money for that.
                      Dave Mason
                      [email protected]
                      Skype is dave.mason46

                      Comment


                        #26
                        Re: Automatically update the Shadow Database

                        Originally posted by DaveM View Post
                        They know it takes time to update from past experiences. I changed a computation that was critical and one user did not wist to click ok. all his figures were wrong. He did learn when he had to do them over, but cost the company and him some money for that.
                        With 10.5 I don't think there is an effective option to not click OK. If so, the question for Alpha would be what's the point of having an OK in the first place?

                        Comment


                          #27
                          Re: Automatically update the Shadow Database

                          Here is an idea. I got started using this technique way back in version 5 days. I have a hospital client with 250 workstations with Alpha installed on it, and in version 5 only 1 person at a time could update the shadow.

                          Since then I use this idea with several clients.
                          1. When they are down (like at night), I copy their data from the server to a local "development" workstation with the lastest copy I want to install.
                          2. I typically compact the database, rebuild the indexes, etc.
                          3. I increment the optimization number and copy it back to the server
                          4. I run the shadow copy locally to get it to update the local shadow
                          5. There is a folder on the server called "Shadow"
                          6. Using a batch file I copy the shadow contents from the "development" workstation to the server. Now the folder shadow on the server contains the current correct shadow.
                          7. On all workstations I set scheduled services to run a batch file, like at 3AM or so, that will copy the contents of the shadow folder on the server to the location of the shadow on the workstation.
                          It runs every night whether it needs to or not. And it runs many times quicker that actually refreshing the shadow, especially with a large database.

                          Here is another approach I use - but for this to work the adb must be set from optimization settings to NOT automatically update. This isput at the top of the autoexec:

                          Code:
                          if a5_is_runtime() .and. a5.Get_Master_Path() > "" 'is shadowed
                           dim network_optimize as p 
                           a5_load_settings("NetworkOptimize",network_optimize) 
                           version1=network_optimize.version_number
                           t=table.open("versionnumber",FILE_RO_SHARED)
                           version2=t.versionnumber
                           t.close()
                           if version1 < version2
                             ui_msg_box("Sorry.","The program will now update - allow approxamately 30 seconds for the update to run, and then Log On again.")
                             sys_shell("updatethisisit.bat")
                             a5.close()
                             end 
                           end if 
                          end if
                          Another possibility is to make a second adb in the same folder. When it runs have it refresh the shadow and close

                          set it to run with scheduled services
                          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


                            #28
                            Re: Automatically update the Shadow Database

                            Originally posted by martinwcole View Post
                            When they are down (like at night),
                            ....
                            On all workstations I set scheduled services to run a batch file, like at 3AM or so
                            Errr...I hope I never get sick late at night in Terrell, Texas.
                            Peter
                            AlphaBase Solutions, LLC

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


                            Comment


                              #29
                              Re: Automatically update the Shadow Database

                              Originally posted by Scott Kurimski View Post
                              Our app is fairly large and takes between 2-3 minutes to update.
                              Scott,

                              My company (which I sold) had a similarly large app where a full shadow update would take several minutes to complete. I built my own shadow update routine which would only update the files that were modified, thus the shadow update only took a few seconds. This was critical since I was doing updates almost every day. If the employees had to wait 2-3-4 minutes every time they started the database for a full shadow update, it would have been impossible. Ironically, the "new" owners switched the whole thing over to point directly to the server a few weeks ago. Since they have a fast managed network, the app runs just as fast as if it were shadowed.
                              Peter
                              AlphaBase Solutions, LLC

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


                              Comment


                                #30
                                Re: Automatically update the Shadow Database

                                Peter, At your old company, how are they updating the app?

                                If the develop works directly from the network files he/she would run into trouble (I would think) because files would be in use when the app is being used by clients.
                                If clients works from the network and the developer works locally, the developer would run into problems when they copied files from their dev machine to the server location because again files may be in use?

                                How are they getting around the "file in use" issue?

                                Comment

                                Working...
                                X