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

table configuration in .dbf file?

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

  • table configuration in .dbf file?

    I made changes in some operations, reports, and forms and sent the *.ddd, *.ddm, *.ddx, set.sex, set.sem, and set.set files to the users (I didn't send any *.dbf, *.cdx, or *.fpt files). The update I sent just screwed up their table configurations on a couple of tables.

    I thought the field types, lengths, etc. were stored in the .dbf files. Anyway, the development app the files were taken from had correct table configurations !?!

    What did I do wrong?

  • #2
    RE: table configuration in .dbf file?

    Becky,

    Don't know, but one thing to check would be to see if the table structures in your DBF's and SETS are identical to theirs. If you changed the name of a field, or the structure of a table or set, your dictionaries will expect those same changes to be present at the remote site.

    -- tom

    Comment


    • #3
      RE: table configuration in .dbf file?

      Further clarification.

      It's true that field types and field names are stored in the DBF's. However, the original DBF format did not permit long field names. I think there was a 10 char limit in the width of a legal field name. Longer field names are now handled by Alpha Five by using the dictionaries to actually hold the longer field names. So, it's vital that the structures of all tables and sets be identical both on the development machine and the remote installation.

      -- tom

      Comment


      • #4
        RE: table configuration in .dbf file?

        Becky,

        Here's the drill I follow when updating a remote site, assuming no changes in the structure of tables or sets, and no new index tag definitions:

        1) zip everything except DBF, CDX, and FPT files.
        2) transfer via pcAnywhere to the remote location's server
        3) backup the remote location's entire application, data and all
        4) verify the integrity of the zip file on the remote location's server.
        5) unzip the update and extract to the remote's database
        folder on the server
        6) network optimize a workstation, and then coach the user
        into doing the same on the other stations.

        An important point: To do it this way, my entire collection of files must be present in a single folder on my development machine. The ADB file, and it's dictionaries, all the DBF's and their dictionaries; the CDX's, the FPTs, the sets... everything.

        This is how I did it when I began doing these kinds of updates, and it served me well. Later on, when updating only a report or a form, I felt comfortable in just sending the dictionary files for the table or set that was involved. I've never been 100% confident where saved operations are stored, so if I change an operation I send everything but the DBF, FPT and CDX files.

        If you can tell us what went wrong on their end, maybe we can suggest a fix. I find it hard to believe that the dictionaries changed their table structures, unless you've got long fieldnames, and structures that are different from theirs.

        -- tom

        Comment


        • #5
          RE: table configuration in .dbf file?

          Tom-
          I know the users' fields, lengths, etc. are the same configuration as mine because I just sent out an entire app to each one, zipped up with THEIR data (they sent me their .dbf & .fpt files, I copied them onto the app, checked a couple of new table configurations, and sent the whole thing back to them wrapped up in WiseInstaller.)

          I added two fields to two of the users' tables:
          "Fund" table....added "num" field - N 2 0
          "Fund" table....added "income" field - N 15 2
          "Salesheader" table....added "bill" field - C 2 0
          "Salesheader" table....added "taxrate" field - N 6 3
          I added these fields on their own app and checked that everything was working before I sent it back out.

          Of couse, I later found a bug and sent the files to "fix" it - including Fund.ddd, Fund.ddx, Fund.ddm, Salesheader.ddd, Salesheader.ddx,and Salesheader.ddm (no .dbf, .fpt, or .cdx files). They came directly off of the same app that I had just distributed to everyone and no field configurations were changed. After the users installed the fix, the configurations of the new fields were switched around:
          "Fund" table....added "num" field - N 15 2
          "Fund" table....added "income" field - N 2 0
          "Salesheader" table....added "bill" field - N 6 3
          "Salesheader" table....added "taxrate" field - C 2 0

          This, of course, screwed all sorts of things up. Now I need to send them a fix for the fix, but I've lost any confidence I had that I'm not going to mess something else up!

          Comment


          • #6
            RE: table configuration in .dbf file?

            Becky,

            One possible explanation for what they are reporting is that the 'first' change, which included the addition of new fields was not installed or optimized throughout their office when the second 'fix' arrived and was installed and distributed.

            -- tom

            Comment


            • #7
              RE: table configuration in .dbf file?

              Nope - I checked each one. They are all on stand-alone PC's (no networks) and I walked each one through the installation process.

              Comment


              • #8
                RE: table configuration in .dbf file?

                Becky,

                The solution 'next time' is easy. Don't try a selective update. Do the development inside a single folder. Send everything BUT the DBF, CDX and FPT files. Send the DBF, CDX and FPT files whenever you change table structure or indextag definitions, but send blank tables, and repopulate them with the user's real data after transfer.

                As I indicated in the other thread, I don't know for certain where saved operations are stored. If they're in the database dictionaries instead of in the dictionaries of the tables or sets, then your second update did not give them what they needed. Refer to Appendix 3 of the User's Guide, for a description of the dictionaries used in a database. Might that explain what happened to their tables? Are the 'old' operations creating or recreating tables that have the 'old' structure?

                The only other possibility I can think of is that somehow you made changes and then forgot to send them on. This is unlikely, but it's something that happens (at least to me), so I thought I'd mention it.

                Another trick that's useful is to download a complete copy of the user's database application and keep it in a separate folder on your development machine. This makes it possible for you to test the installation of an update on your machine before sending it on to them.

                -- tom

                Comment


                • #9
                  RE: table configuration in .dbf file?

                  Tom and Becky

                  The form designs, reports, operations, etc are all stored in the data dictionaries. The table structure is saved only in the dbf file. However, Tom is correct that long names are also stored in the data dictionaries. If there are any long names for the fields, (over 10 characters), then all of the field names are saved in the data dictionary. Therefore if the data dictionary is corrupted, the field names could be mixed. This is something I have seen in my own databases.

                  One problem with long names occurs if the first 9 characters are the same for 2 fields. Alpha creates short names that are the first 9 characters plus a number. Therefore if more that one field has the same 9 characters, the names are virtually identical. This normally does not cause a problem unless the field is moved in the structure. Then the data dictionary reference can get confused.

                  This problem can occur for a number of other reasons. From past experience, I only add fields to the bottom of a table structure. After changing any table structure, I always save the changes, and immediately compact the database, which cleans up the data dictionaries. Then I close the database, and reopen. Sometimes I close A5 also to clean everything out of memory. Then I confirm that the changes are present and correct. Then and only then do I make any changes to forms, operations etc. I have had a couple instances where the new structure was not correct and I had to repeat the process. In one case, I had to duplicate the table as the data dictionary apparently was damaged and could not locate the correct field reference. Since then, I only use 10 character names for fields and indexes and haven't had any problems.

                  The fact that copying the data dictionaries "corrupted" the table structure would indicate a couple possibilities.

                  First, the new data dictionaries were built on a different actual structure. Your message indicates that this is unlikely.

                  Second the table structures at the remote location were different. I have found that well meaning users don't always do what you expect. I too have walked people through update procedures only to find that they really didn't do what they said they did. It sounds like your procedure is rather foolproof, if they actually followed it.

                  Third, the data dictionaries were corrupted. This can happen more often that people realize if they don't periodically compact the database. I have seen ddm files well over 2 meg in size that compacted were only a couple hundred k. That is a lot of junk to cause problems.

                  Fourth, when I make a change, I always test the update on my own computer before I send it out. I keep copies of each working version of an application. I will reload a previous version (after backing everything up) and apply the update and verify the changes were as expected. I have been surprised on more than one occasion.

                  Becky, your basic procedure sounds correct and should not have given any problems. It is essentially the same procedure used by most developers to update a working application. There are been many posts and articles in the newsletter about the process. The fact that yours failed, indicates that something did not behave as intended.

                  Jerry

                  Comment


                  • #10
                    RE: table configuration in .dbf file?

                    Thanks, Tom & Jerry, for your words of wisdom. A lot to think about. I have been updating and distributing files this way for a couple of years without any problem. I perform a Database Compact often as I work and always before I finish things up to send files out. The one thing I did differently this time was to use WiseInstaller to zip and create and installation routine for ONLY the updated files (I always use it for the entire app with data). Don't know if that caused a problem or not.

                    Anyway, thanks for the advise. I will surely be more cautious in the future.

                    Comment

                    Working...
                    X