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

Ten characters Field Name Rule

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

  • #16
    Re: Ten characters Field Name Rule

    Originally posted by Raymond Lyons View Post
    Anyway, once I learned what causes the truncation and how to easily deal with it if happens again
    Can you share your experiences about what causes truncation and the tricks to solve it?

    Thanks in advance.

    Regards,

    Comment


    • #17
      Re: Ten characters Field Name Rule

      Hi,

      I have no problem to adhere to 10 char fields and 8 char table.

      Where I have trouble is to be counting to see if I am under the rule.

      This is why my previous questions, is a way to enforce it or a utility that check for it?

      Regards,

      Comment


      • #18
        Re: Ten characters Field Name Rule

        Originally posted by DaveM View Post
        ....I have had the truncation problem. yes a backup was available. It was a bit off the date, so there was still work to catch it up. No, I do not want that again....
        First of all, your backups should not be more than a day "off date" and if one has just restructured one should always backup that file right away on the fly.

        Originally posted by DaveM View Post
        I can think of no reason to use more than 10 for a field and no reason past 8 on a file name. No, I do not need to know your reasons. They can be changed.
        Dave, your first statement here is obviously false--you certainly can think of all kinds of reasons and you seem to suggest that the reasons Bill Parker gave are just dumb. Sorry but it sounds to me like you are being irrationally extreme here and are bordering on being insulting.

        Originally posted by chematercero View Post
        Can you share your experiences about what causes truncation and the tricks to solve it?...
        Well, it only happened more than 10 years ago when I was far more young and ignorant than I am now and my memory on the subject may not be very good. As I recall, I thought I had some need to open a .DBF file in some other program like excel, do something with it, and save it in that program as a d-base file to get it back into A5. That would certainly cause truncation. But in fact there never was a real need to use another program for whatever I was doing (off the top of my head I can't think of anything I can't do with Alpha's tools) and bringing it back in as a D-base formatted file was just plain ignorant. But suppose there had been a need. Then one way to get it right again would be to simply append your D-base formatted, massaged data back into the original (or backed up) table after emptying it--assuming the field order is the same or it can be easily adjusted in the append setup. If you have the two tables, one truncated and one not (e.g., a backup), I am sure you could also just change the truncated names back to their originals with a quick and easy xbasic script or function, though I never did that. I suppose others who have had more recent experience have found other fairly easy ways of dealing with the problem. And of course if you do something in excel, just don't use d-base formatting at all and you probably won't have any problems with truncation (export/import as something else).

        Now let me clarify something here: I do try to keep field names to no more than 10 characters whenever clarity allows. I just have not found any sufficiently good reason to have it become part of my Alpha Five religion. The few field names that are longer are usually few enough (maybe 10 out of 100 and with standard enough endings such as "phn") that I can remember what the endings are and simply type them in faster than doing an append. But why bother keeping any names short if data dictionary corruption just never happens for me without having a recent backup? One reason is that the expression builder will only take so many characters, though that number was greatly increased a few years ago so that this is not the problem it used to be. But there still is a limit. This is also a reason to keep calc field names short unless clarity demands a longer name.

        As for some utility to warn/stop you from going over 10 characters, I would think something like that should be possible and even I would love to have it if it could be just a warning. Maybe someone could do a utility or make this a wish list item.

        Raymond Lyons

        Comment


        • #19
          Re: Ten characters Field Name Rule

          This is rudimentary and someone who has a use for it can expand on it. There is no error checking and the like so is not really a proper utility. But it does let you know the fields that are over 10 characters. If any longer field names are found a text file is created in the application folder called Fields_too_long.txt and it is opened automatically.

          Save the text file somewhere. Import the function into the code tab. Run it from the interactive window using CheckFieldNameLength()
          Tim Kiebert
          Eagle Creek Citrus
          A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

          Comment


          • #20
            Re: Ten characters Field Name Rule

            Ray Lyons,

            Dave, your first statement here is obviously false--you certainly can think of all kinds of reasons and you seem to suggest that the reasons Bill Parker gave are just dumb. Sorry but it sounds to me like you are being irrationally extreme here and are bordering on being insulting.
            Actually, this could be construed as insulting. I would not try to insult anyone and don't think you mean to either. The first statement is not FALSE.

            I can think of NO "REAL" reason why one would HAVE to go past 10 in a field. One could easily think of excuses to use the longer field names.

            my "fname" could be "firstname", "firstfullname", "thefirstname" or "fnam" and still be understood. If properly listed somewhere to keep up with it "fn" could be ok to.

            Not to beat this to death. pretty much, if you put a 10 character field name in the builder, the onse under it will be about the same length unless it has a bunch of either short or long letters.

            I hope the utility Tim K made works to solve the problem.
            Dave Mason
            [email protected]
            Skype is dave.mason46

            Comment


            • #21
              Re: Ten characters Field Name Rule

              Originally posted by DaveM View Post
              I can think of no reason to use more than 10 for a field and no reason past 8 on a file name.
              Hello Dave,

              May I ask you why you use 8 characters in files names? Why not 10?

              Comment


              • #22
                Re: Ten characters Field Name Rule

                Originally posted by JohnZaleski View Post
                Another reason to stick to 10 or less characters is if you use 3rd party software with an ODBC connection to Alpha data.The field names will appear truncated when using Crystal Reports for instance.
                Another thing to remember about truncation of long names. They are simply truncated. This means that

                Home Address Streeet
                Home Address City
                Home Address State

                will become something like:

                Home_Addre
                Home_Addre
                Home_Addre

                (Disclaimer: I don't think so but maybe it adds a 1,2,3 etc on the end. If so, it still doesn't leave much indication of which was which.)

                In other words, even if you don't limit your names to 10 characters, it's a very good idea to make sure the first 10 characters are not the same in any two fields.

                Originally posted by Jean-Leo View Post
                Hello Dave,

                May I ask you why you use 8 characters in files names? Why not 10?
                Jean-Leo I think you are showing your [young] age. You don't remember the good ol' DOS days? In DOS, field names were limited to 8 characters. If you get the "short name" of a table named MyLongTableName.dbf, it will be something like "MyLongT~.dbf" (as best I recall).

                I thought there was a function in A5 that would return the short name. Maybe something to do with FTP or URLs?? If so, I can't find it now. (There is a "longname_to_shortname" function but it only converts the folder names. It doesn't change the file name itself. Not sure what benefit it is but that's how it works.)

                Re: "Corruption" of the data dictionaries.

                To the best of my knowledge, this is always the result of the developer doing something "dumb". Having a data dictionary simply "go bad" on its own would be extremely rare based on my experience.

                Comment


                • #23
                  Re: Ten characters Field Name Rule

                  Originally posted by Tim Kiebert View Post
                  This is rudimentary and someone who has a use for it can expand on it. ....
                  Tim, I like your use of Replicate() to create those header lines. I'll probably steal that idea from you in the future.

                  By the way, here are my suggested improvements:

                  Comment


                  • #24
                    Re: Ten characters Field Name Rule

                    Originally posted by CALocklin View Post
                    I'll probably steal that idea from you in the future.
                    By all means. I have pinched plenty from you. :)
                    Tim Kiebert
                    Eagle Creek Citrus
                    A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

                    Comment


                    • #25
                      Re: Ten characters Field Name Rule

                      Hi Tim,

                      Originally posted by Tim Kiebert View Post
                      This is rudimentary and someone who has a use for it can expand on it.
                      I have no real use for it :), but I have placed my version on my web site for all who need to use it. It displays and/or returns any field names and/or index names longer than 10 characters from a specified table list or the entire database.

                      You can reach it via this thread here.
                      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


                      • #26
                        Re: Ten characters Field Name Rule

                        Thank you very much Cal for your reply. Yes, I still remember the old DOS 6,0 day, but I did't think that the model 8,3 for the files names were still valid today.

                        Originally posted by CALocklin View Post
                        Jean-Leo I think you are showing your [young] age. You don't remember the good ol' DOS days?
                        By the way, I am sixty four years old, and I am going to be 65 next month. However, if this is what you call "young man", then I accept gladly the compliment.

                        Comment


                        • #27
                          Re: Ten characters Field Name Rule

                          Originally posted by chematercero View Post
                          Can you share your experiences about what causes truncation and the tricks to solve it?
                          Like Raymond said above, if you open a dbf file in Excel (most likely place this would happen), and save the dbf file from Excel, then the long field names are truncated. Thus, use SaveAs if opening a dbf directly in a 3rd party tool. BTW: this is a dbf limitation, not an Alpha shortcoming.
                          Peter
                          AlphaBase Solutions, LLC

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


                          Comment


                          • #28
                            Re: Ten characters Field Name Rule

                            Originally posted by CALocklin View Post
                            ....By the way, here are my suggested improvements:
                            Cal, ???? What happened to the suggestions?

                            Tim and Ira, Thanks! As I said above, I go over 10 when I see the need (clarity or in many cases having/wanting to match fields in other file formats over which I have no control) but I still like to keep them under 10 in all other cases.

                            Still, wouldn't it be nice if when building/editing a table the color of the characters were to change (to red?) when one reached 11? Seems like that would be an easy feature for Alpha to add, though it should be an option in Settings because many either don't see any need or will not as we move along to no longer being tied to outmoded DBF "standards"--except that those "standards" are not the only reason to keep things short, e.g. expression builder issues. Probably this should still be a Wish List item?

                            Raymond Lyons

                            Comment


                            • #29
                              Re: Ten characters Field Name Rule

                              Originally posted by Raymond Lyons View Post
                              Cal, ???? What happened to the suggestions?
                              What do you mean??? I listed all of my suggestions!!!

                              (Sure, other features could be added but it does what it was designed to do quite well as-is.)

                              Comment


                              • #30
                                Re: Ten characters Field Name Rule

                                Originally posted by CALocklin View Post
                                What do you mean??? I listed all of my suggestions!!!

                                (Sure, other features could be added but it does what it was designed to do quite well as-is.)
                                Ah, I am a bit slow this morning! I could blame it on the drugs (Rx!!) I am on at the moment or maybe the fact I was knocked out yesterday from being on the damned drugs. Anyway, now I get it!

                                Raymond Lyons

                                Comment

                                Working...
                                X