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

Version Control

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

    #16
    Re: Version Control

    Try this link, I posted a number of routines I use for adding fields and changing their size. It also shows how I check for the lastest update and skip the routine if it already exists:
    http://msgboard.alphasoftware.com/al...68&postcount=5

    Originally posted by DickJames View Post
    My method thus far in adding tables has been to simply include the table (dbf file) in the version update. This is not a good method, however, because if the version update is run again after the table has been used, the data added to the table is lost.
    This is another reason I use a third party installer - I can include new tables with the update with no concern about them rerunning it. The install routine is set to overwrite everything except the data files. Those are set to "Never Overwrite". That way it doesn't matter how many times the user re-installs an update. In fact, the only difference for the user between my "install" routines and my "update" routines are that the "update" downloads faster because it doesn't include the runtime files. They could also re-run the original "install" routine as often as they wanted and there would be no concern about overwriting data. If they really wanted to start from scratch, they'd have to 'manually' delete the .dbf/.fpt and, preferably, the .cdx files.

    Note: There is a slight difference in the internal setup of my update routines because I allow the user to install the program under any folder they choose and put the application in a subfolder under the runtime but, although it's not that difficult, it takes awhile to describe so I won't go into that here. Later: I found a previous post of my method: http://msgboard.alphasoftware.com/al...8&postcount=17

    That's also one reason I normally use install programs even for single-user updates. With a zip file it may be possible for them to mess something up by unzipping again later. The way my install routines are set up, it doesn't matter - the worst they can do is to re-install an older version by mistake. Even newer table changes will usually work fine with older versions since new fields are added at the end of the table. There might be a problem with field size changes but those are rare. The solution would be to simply re-install the newer version - field size changes won't reverse themselves so that's not a concern.

    Comment


      #17
      Re: Version Control

      Now we are on to something. Based upon the routine posted and other responses I believe I can achieve what needs to be done in my case. I just wanted to make sure before I commit to A5. I absolutely must be able to update my database (add/alter fields and tables, drop tables, etc.) when opening a database. I cannot do this at install time because there may be many databases per seat, some may not even be resident during installation. I also have to be able to gain exclusive access rights to lock out any other user during this operation.

      I think I will change from my current method though. Currently the app looks at the versions and does the upgrade. In A5 I will probably inform the user that an "admin" module must be run (with exclusive rights) to perform the update before they can proceed.

      A5 is already causing me to lose sleep! Because I can't stop reading the wealth of information available - it's awesome.

      Comment


        #18
        Re: Version Control

        Dick, I've quickly reviewed your script and don't see anything there that would cause Alpha Five to change a field width for an existing field. Why do you think your script should be able to do so? What am I missing? -- tom

        Comment


          #19
          Re: Version Control

          Tom --

          In my example above, the routine creates a field called dispocaseno that is 20 characters long. If I subsequently decided that I wanted the field to be 25 characters long, I might (did) try to simply change the field spec in my routine to

          Code:
          newfieldspecs[j] = ",C,25"
          and add the field again by re-running the routine. In my experience, this does (did) not work.

          -- Dick James

          Comment


            #20
            Re: Version Control

            Dick, why do you think that would work? The only statement which manipulates the target table (that I saw, anyway) is
            Code:
            a5_add_fields_to_table(newfieldtable[i], addedfieldspecs)
            Nothing in the help file documentation on this statement indicates it can be used to change a field width. I must be missing something obvious here?

            Comment


              #21
              Re: Version Control

              Is it possible to run an SQL command at this point? Something like this perhaps:

              ALTER TABLE YourTableName ALTER FieldName C (80)

              To change YourTableName such that FieldName is changed from whatever it was, maybe a 20 character field, to an 80 character field? I'm sure this is not A5 syntax for the field name definition but you get the drift...

              Comment


                #22
                Re: Version Control

                Jeff, don't know about SQL tables, but for native Alpha Five tables the A5_ChangeFieldSize() function looks like it would do the trick.

                Comment


                  #23
                  Re: Version Control

                  JAF,

                  All my apps are in the same folder with my runtimes. In other words, if I have a widget sales app, it has the runtime for it in the same folder. This simplifies a lot for me. They can be easily placed in any folder the user chooses or the choice I have made. I also make a simple exe to execute it all.

                  My manipulation of fields are done on first start of a newly installed update by way of the bootstrap at server level. First by checking for a field and the checking for size, etc. If changes are needed, they are don there. Before anything is touched, a copy of all is placed in a safe folder for later go-back if necessary. The bootstrap for workstations is a bit simpler, but they may have to be redone also if there is an Alpha Version change.

                  I am talking about dbf files only here. I have not tackled that side of sql to this point. I listen with interest as you all sort this out so I will have a better idea also.
                  Dave Mason
                  [email protected]
                  Skype is dave.mason46

                  Comment


                    #24
                    Re: Version Control

                    Tom --

                    Dick, why do you think that would work?
                    As I have said several times now, it will not work, and I do not think it will work.

                    However, if someone is learning the language, (as I was and still am), it is not unusual to misunderstand how a statement will work. My incorrect theory was that adding a field was the same as replacing a field, which it is not.

                    I confess I probably attempted to do this before I understood the documentation. I don't think you are missing anything obvious here.

                    -- Dick

                    Comment


                      #25
                      Re: Version Control

                      Dick, I thought you were saying your script was failing to do something you thought it ought to be doing. i.e. that something here was "broken" in Alpha Five. I'm sorry if I made more out of this than was appropriate. Your code isn't broken. It just doesn't include the code necessary to change field widths. -- tom

                      Comment


                        #26
                        Re: Version Control

                        Dick,

                        The old method of adding and otherwise changing fields was to make an empty table of a different name. Include this table with your update. Append the data from the table you are going to replace. delete the table to be replaced at the dos level(leaves the support files if needed. Rename the new table to the same name as the table deleted. clean up any support files left over.

                        With newer method/functions, we can do it muchsimpler as long as we don't make a dumb error.

                        It was not many years ago that people on this forum told me you could not change or add a field in a dbf file with Alpha. Thank goodness it was changed. We were doing it 20 years ago in Clipper.
                        Dave Mason
                        [email protected]
                        Skype is dave.mason46

                        Comment


                          #27
                          Re: Version Control

                          Hi Dave,

                          Originally posted by DaveM View Post
                          It was not many years ago that people on this forum told me you could not change or add a field in a dbf file with Alpha. Thank goodness it was changed. We were doing it 20 years ago in Clipper.
                          If someone on this forum told you that, they were wrong.

                          Alpha has had the ability to do that in Alpha 3 (1986), Alpha 4 (1988?) and Alpha 5 (1994?) always.

                          The only warning someone might have given is that some of the table dictionary entries (things like operations, forms etc) might (and I reiterate MIGHT) have been field position specific, rather than name specific. Also, some of them might have had confusion to 10 character names vs larger than 10 character names. Hence, Cal, myself and others have always told people to use 10 or less characters in their field and index names (plus it is more standard for other programs reading the dbf). New fields were best handled by adding new fields to the end of the table, and not deleting an old fields.

                          Changing a field's width did not and does not change the display width on layouts (although it might be nice to have that option)
                          Regards,

                          Ira J. Perlow
                          Computer Systems Design


                          CSDA A5 Products
                          New - Free CSDA DiagInfo - v1.39, 30 Apr 2013
                          CSDA Barcode Functions

                          CSDA Code Utility
                          CSDA Screen Capture


                          Comment


                            #28
                            Re: Version Control

                            I think he means/meant via code.
                            There can be only one.

                            Comment


                              #29
                              Re: Version Control

                              Hi Stan,

                              I think you are right, however, Alpha 4 could do it out of the box. Alpha 5 could do it as well. There may not have been easy functions out of the box in earlier versions, but you could clearly do it by code if you wanted/needed it, wrapping it into a nice little function.
                              Regards,

                              Ira J. Perlow
                              Computer Systems Design


                              CSDA A5 Products
                              New - Free CSDA DiagInfo - v1.39, 30 Apr 2013
                              CSDA Barcode Functions

                              CSDA Code Utility
                              CSDA Screen Capture


                              Comment


                                #30
                                Re: Version Control

                                I did mean via code.

                                I have always known how to mess up, I mean change fields and makem, etc. the standard method. There was no way(according to people on this site) to add or alter a field in a table on the fly.

                                I always new it was possible somehow or how could Alpha let us do it. Plus we had been doing it VIA CODE in clipper for a long time before I asked.

                                I have followed and try to get others to follow the "10" naming convention also.
                                Dave Mason
                                [email protected]
                                Skype is dave.mason46

                                Comment

                                Working...
                                X