Alpha Video Training
Results 1 to 10 of 10

Thread: Renaming Tables & Sets

  1. #1
    "Certified" Alphaholic forskare's Avatar
    Real Name
    Ken Nordin
    Join Date
    Apr 2000
    Location
    Walker, MN
    Posts
    7,545

    Default Renaming Tables & Sets

    I understand that by naming a table with two words without using the underscore some problems can occur at some point down the road. For this reason, I would like to rename my tables.

    I searched the database and found Tovia's post. Selwyn stated that v1 used to have a feature that automaticly renamed all occurances whether it be in code or whatever, but it was taken out due to not working too well. It would be most helpful to have this feature back in v5 that was in v1. It may not be used much but when it's needed, IT'S NEEDED!. If not, documentation on all that's involved in the renaming procedure would be somewhat handy. (yes, I checked A5 help)

    For example, I changed a table name. When I tried to edit the set, I got a message that the old table name can't be found, even after I was able to get into the set structure and observed that the table had in fact been renamed.

    So, what do I do now?

    kenn

    I emailed Tovia requesting helpful hints. But if others have insight to this, I'm all eyes.

    Thanks,

    kenn

  2. #2
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default RE: Renaming Tables & Sets

    Ken,

    I would change the table name back to it's original, edit the set (deleting the link), rename the table, then edit the set once more, creating a link.

    And I would try to follow this sequence in the future, checking all sets which might contain the table before renaming.

    Stan

  3. #3
    "Certified" Alphaholic forskare's Avatar
    Real Name
    Ken Nordin
    Join Date
    Apr 2000
    Location
    Walker, MN
    Posts
    7,545

    Default RE: Renaming Tables & Sets

    Thanks Stan,

    Yup, That's what I did. Apparently when a table with two words is not linked with the _, the _ is added by Alpha in the set structure. I wonder where else it adds an _. I noticed it adds the _ in two worded field names.

    Oh well, back to my renaming.



    Kenn

  4. #4
    Volunteer Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,643

    Default RE: Renaming Tables & Sets

    Probably at least half my tables & sets have names with two or more words with no underscores. Never had a problem with table names thus. However, occasionally have had definite "problems" with forms named with two or more words - i.e. xbasic sometimes fails to recognize the form if it is not one continuous string name. No problems with reports using two words as far as I can remember.

  5. #5
    "Certified" Alphaholic
    Real Name
    Cal Locklin
    Join Date
    Mar 2000
    Location
    S.E. Michigan
    Posts
    5,763

    Default RE: Renaming Tables & Sets

    I remember having trouble with blank spaces in a table name when using Xbasic to script an append operation. When using Xbasic, there was no way to access a table name that had a blank in it. If you typed the blank space you got one error - I forget the specifics. And, when you put the underscore in the Xbasic script it would say something like "file not found". It was apparently one o' them Catch 22s.

    I found this when a new customer sent me an application that was already fairly well developed. I ended up spending 2-3 hours finding all the places that had to be fixed. Now, I play it safe. I NEVER leave blank spaces in field names, table names, or form names.

    One minor advantage I find to this is that scripts become easier to read. There's never a question about a name with underscores being a name and not a phrase.

  6. #6
    "Certified" Alphaholic forskare's Avatar
    Real Name
    Ken Nordin
    Join Date
    Apr 2000
    Location
    Walker, MN
    Posts
    7,545

    Default RE: Renaming Tables & Sets

    Interesting, verrry interesting. I'm cleaning housse on my app.

    kenn

  7. #7
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default RE: Renaming Tables & Sets

    Yes, but then the "names" begin to look like "methods".

  8. #8
    Oran Hamilton
    Guest

    Default RE: Renaming Tables & Sets

    Cal,

    I to have run into the `Catch 22' while working with scripts. In reading the other postings, I see others have also.

    I have developed my own naming conventions and now use them religiously (habitually? methodically?) to insure I do not run into this problem.

    One convention I adhere to is documenting my work, both in the scripts/functions and on paper. This allows me to return six months or a year later and understand what I was doing. Otherwise I found even I could not follow the logic. Further, when I come across a script I or someone else wrote (without documentation) it becomes very difficult to find the break point or where to begin a modification. Until I had my naming convention as form of habit, I even placed the convention as a comment within the scripts I wrote so that I knew what I had done. This creates a little extra work now, but in the long run it saves me time.

    Oran

  9. #9
    Member
    Real Name
    Herman Jones
    Join Date
    Jun 2008
    Posts
    18

    Default Re: Renaming Tables

    Renaming Tables, only have one from and one report!

  10. #10
    "Certified" Alphaholic DaveM's Avatar
    Real Name
    Dave Mason
    Join Date
    Jul 2000
    Location
    Hudson, FL
    Posts
    6,013

    Default Re: Renaming Tables & Sets

    Never use 2 names for anything. That way never a problem.
    I keep dbf at 8 or less Characters and field names at 10 or less. Forms at or below 10 mostly. Same with scripts and functions as best I can.


    I have had issues with much in naming conventions and why I live very strict.
    Dave Mason
    dave@aldausa.com
    Skype is dave.mason46

Similar Threads

  1. Databases, Sets, and Tables
    By Rob Schippers in forum Alpha Five Version 4
    Replies: 2
    Last Post: 12-04-2002, 05:05 PM
  2. Problem with Tables and Sets
    By Todd Canipe in forum Alpha Five Version 5
    Replies: 1
    Last Post: 12-02-2002, 02:30 AM
  3. renaming path for "added" tables
    By tcampb in forum Alpha Five Version 4
    Replies: 4
    Last Post: 03-07-2002, 05:37 PM
  4. Ghosted tables/sets
    By Jeff Snyder in forum Alpha Five Version 4
    Replies: 3
    Last Post: 10-18-2000, 08:53 AM
  5. Amount of Tables Sets ??
    By Thomas Holt in forum Alpha Five Version 4
    Replies: 2
    Last Post: 04-19-2000, 06:10 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •