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

New application version install while keeping data

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

    New application version install while keeping data

    Hello all,

    I have a need to allow my users to upgrade their application while maintaining their data from a previous version. I do not believe this is some new requirement but I find that backing up and restoring using Alpha backup/restore brings back the old forms and reverts the user to the old version. I tried to copy the DBF and FPT files to another directory and then copy them back into the A5 directory and that generated warning messages precluding starting the application. Adding ALB and ALX files stopped the warning messages but then A5 could not find the forms. I know that adding the ALB and ALX is not proper but I found it may be a clue. I am convinced that this should be an easy thing.

    In this scenario I need to keep the user data intact while upgrading the rest of the application pieces.

    Anybody?

    Thanks,

    Gene

    #2
    Re: New application version install while keeping data

    Gene:

    If you don't make changes to the table structures (fieldnames, sizes etc) then typically all the design changes would be saved in the data dictionaries. So you could transfer those from your development machine and add to, or overwrite, the files on your users' machines.

    The data dictionary files are groups of three *.ddd, ddm, ddx, set, sem, sex, alb, alm, alx and the three file types of each group must always be copied together, never as individual or pairs of files as you seem to have done.

    If you change the tables structures, you must find a way to apply those changes on the users' machines. That can be done automatically with xbasic.

    And always make backups before you begin! I would make these backups as a separate part of the upgrade process and nothing to do with the built-in Alpha backup routines.
    Finian

    Comment


      #3
      Re: New application version install while keeping data

      Gene,

      it would help to know from what version to what version??

      Most of the time, just installing the new version is all you need to do. going from v1 to v11 could mean some extra work, but going from v10 to v11 may mean no extra work.
      Dave Mason
      [email protected]
      Skype is dave.mason46

      Comment


        #4
        Re: New application version install while keeping data

        Hi Finian,

        I have the two database files(same name ) and different path with one for Developer and User copy. I normally use the Backup,Application only option, from Developer and restored the Application only backup copies at User database. I found that " the tables structures " problem when I changed or added new tables.

        My question is base on this
        If you change the tables structures, you must find a way to apply those changes on the users' machines. That can be done automatically with xbasic.
        (1) How and what do I start about - " That can be done automatically with xbasic. " when I changed the table structures
        Do you have any sample code?
        (2) Why the user copy path did not change the directory when I restored it at User Copy after added a new tables at Developer.
        Example; My developer path is c:\Develop\ApplicationName\NewTableName
        after restored to User Copy
        my User path is c:\User\ApplicationName\
        my ControlPanel is shown for the "NewTableName" as C:\Develop\applicationName\NewTableName

        Comment


          #5
          Re: New application version install while keeping data

          Gene,

          I've found the simplest way for me to upgrade to a new version of an application is to save all *.dbf, *.cdx and *.fpt files (data, index and memo) to a new directory and to then copy over the complete upgraded version to the existing live directory. This will ensure all updated forms, reports, browses etc. are copied to the live version along with any new tables. Once complete you can copy the live data previously saved off back to the live directory and all is ready to go.

          If you have added new fields to existing tables you can add these into the live tables using XBasic in your AUTOEXEC script. For example, to add a new field to the payments table use:

          Code:
          dim tbl as P
          tbl = table.open("payments")
          allnames = tbl.field_name_get()
          tbl.close()
          if "Reference" !$ allnames then
          	a5_add_fields_to_table(a5.Get_Master_Path()+"\payments.dbf","Reference,C,30")
          end if
          Hope this helps.

          Comment


            #6
            Re: New application version install while keeping data

            Gene,

            The beginning point for me is understanding where Alpha stores stuff. When I change "stuff" on my developer copy if I know where it's stored I can figure out how to move it to the production copy. Review the help file topic "Alpha Five File Types" a couple of times.

            Next, its important to keep the entire workspace in one directory (folder). Don't even use sub-folders. This will help you move complete copies of the workspace to other machines or folders.

            Next, for us to help you better please tell us whether you're planning to update the production copy manually, or do you have to have it entirely scripted. Naturally, a completely scripted update is an advanced topic.

            Finally, tell us in detail how your new application is different from the existing. Different update techniques will apply depending on what has changed. Possible changes include (but are not limited to) the following:

            a) new or changed index definitions
            b) new tables or changes to existing table structures
            c) new or changed set specifications
            d) new or changed forms, reports, or labels for existing tables or sets
            e) new code (scripts / functions) on the code page of your control panel
            f) new or changed saved operations for existing tables or sets
            g) new or changed field rules for existing tables or sets

            -- tom

            Comment


              #7
              Re: New application version install while keeping data

              I guess I am confused about what is trying to be done.
              New version to me would mean moving from v11 to v12 or similar.
              If you are trying to update your internal versioning, that is different.

              Doing it locally is fairly simple if the copy and paste are not to complicated.
              Backup the whole directory of the server before anything.
              add any new tables/fpt's with supporting files, then copy the supporting files for everything else(but not the tables/fpt's as they would over write data)
              In the event you added new fields, you manually do that to the affected tables at server.
              THen be sure to compact the server files.

              Now if you are updating a database that is far away, it becomes a little more complicated.
              Dave Mason
              [email protected]
              Skype is dave.mason46

              Comment


                #8
                Re: New application version install while keeping data

                To all that replied. Wow, what a buch of stuff to digest! Thanks to all.

                Clarification. I am not concerned about upgrading the A5 version. Just keeping the users existing data intact when I provide an updated copy of my application to them. Jon Moody seems to understand my need. I am going to take some time to digest all these suggestions.

                Thanks to all.

                Gene

                Comment


                  #9
                  Re: New application version install while keeping data

                  I do this very often and very simply, updating different clients' with different application revisions.
                  In broad terms;-
                  Close all open windows (except Control Panel)
                  Select Tools | Zip Workspace
                  When the dialog of all the files appears, all files are checked
                  Click the button "Unmark Files" and Select Datafiles only.
                  All the data files become unchecked. Name and save the zip. Unzip all the files to overwrite on the client side.
                  Their data is unchanged but they will now be running the new version app.

                  Their could be some minor additions to send like tables that control the program or contain update help or release number
                  You could save the definition once you have added these and call up the save definition each time you update.

                  Comment


                    #10
                    Re: New application version install while keeping data

                    Originally posted by Ray in Capetown View Post
                    I do this very often and very simply, updating different clients' with different application revisions.
                    In broad terms;-
                    Close all open windows (except Control Panel)
                    Select Tools | Zip Workspace
                    When the dialog of all the files appears, all files are checked
                    Click the button "Unmark Files" and Select Datafiles only.
                    All the data files become unchecked. Name and save the zip. Unzip all the files to overwrite on the client side.
                    Their data is unchanged but they will now be running the new version app.

                    Their could be some minor additions to send like tables that control the program or contain update help or release number
                    You could save the definition once you have added these and call up the save definition each time you update.
                    How do you handle the data structure changes?
                    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


                      #11
                      Re: New application version install while keeping data

                      I was avoiding that subject for now.
                      I code the change differently for various programs depending on client/version distribution. I try to be strategic about not always thereafter running redundant checks.
                      If there are not many clients I put the code to check and change structure in autoexec where the first user instantiates the change.
                      When there is a structure change for many clients and to not have to make everyone update, I place a check for this in the code or form where it is required, give an appropriate message, exit to run a file structure maintenance routine .. or notify the user to exit all users and run the update routine.
                      A change to fieldsizes in a table, for example would run this code
                      Code:
                      ZZZZZZZ="CHANGE SIZES Description & CusOno Increased"
                      wasfld=<<%a%
                      CUS_ONO,C,16
                      DESCRFULL,C,40
                      DESCRSHORT,C,16
                      COLOUR,C,100
                      %a%
                      nowfld=<<%a%
                      cus_ono,C,28
                      DESCRFULL,C,55
                      descrshort,c,24
                      COLOUR,C,160
                      %a%
                      ZZZZZZZ=wasfld
                      headf=TABLE.EXTERNAL_FIELD_NAME_GET("CUSORD1_HEAD", "n,t,W" )
                      if "cus_ono,C,28"$headf .and. "DESCRFULL,C,55"$headf .and. "descrshort,c,24"$headf .AND. "COLOUR,C,160"$headf
                      else
                      	a5_changefieldsize("CUSORD1_HEAD", wasfld, nowfld)
                      	wflashmessage(ZZZZZZZ,.5,"dark green","pale blue")
                      end if	'---------
                      For a new field the code is a lot easier, example
                      Code:
                      [CODE]ZZZZZZZ="Add_Memo_to_colours:"
                      fields="MEMO,M,10"
                      if "memo"$TABLE.EXTERNAL_FIELD_NAME_GET( "colours", "n" )=.f.
                      	table.add_fields("colours", fields)
                      	wflashmessage(ZZZZZZZ,.5,"dark green","pale blue")
                      end if
                      [/CODE]
                      I use a variable ZZZZZZZZ to draw my focus to what the code does as well as flash a message that the user knows something was changed.
                      At a later stage I will remove that code for any future update to the customer.

                      Comment


                        #12
                        Re: New application version install while keeping data

                        I can answer the data question easily for the way I handle it when it is away from where I am.

                        I do an up date with Astrum Installer, that starts with copying the old data to a new folder. Safe that way.
                        delete all in the folder/or not
                        Then install the new data tables(empty) and app
                        run the app(adb) that is nothing more than appends in UDF's with autoexec to run it and the adb is the name of the normal one
                        at the end of the appends, rename the proper adb files to the one that had the appends.
                        explain: the real adb files are sent with a different name. Once the appends are done, the correct adb, alx, etc are renamed to the one a client will use making the update on gone.
                        Operation complete.
                        On a larger app this is all done in a few minutes to 1 hour(depending on data size) with no client intervention.
                        Dave Mason
                        [email protected]
                        Skype is dave.mason46

                        Comment

                        Working...
                        X