Alpha Video Training
Results 1 to 9 of 9

Thread: Alpha won't let me duplicate tables as relative file paths

  1. #1
    Member
    Real Name
    Steve Hall
    Join Date
    May 2005
    Location
    Dallas, TX
    Posts
    217

    Default Alpha won't let me duplicate tables as relative file paths

    Hello.
    I have a database that all of the tables are setup so the database can be installed in any directory. The tables are in a subfolder of my database called "data". I needed to create a new table that was located in my "data" folder that is a duplicate of one of my other tables.

    I followed what I usually do (use the duplicate table option) and I entered my new table name with subdirectory file path. However, when I do this, it puts my table into the database with an ABSOLUTE file path.

    I have also tried using \\data\file.dbf, \data\file.dbf, and data\file.dbf. When I do it this way, the copy function fails.

    What makes this problem worse is that after I do this, Alpha can't find any of my other tables. However, instead of making the table "translucent", it leaves the table "full color". When you right-click on any of the tables, all that is left is the "drop table from database" option.

    I'll restart Alpha and all of my tables appear. However, the new table I have just added has an Absolute file path while the rest of my database has Relative file paths.

    Basically, can anyone see if they can create or duplicate a table in my test database that has a "relative" file path vs. an "absolute" file path?


    Thanks!
    Steve Hall
    Steve Hall

  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: Alpha won't let me duplicate tables as relative file paths

    There are only two tables in the data subdirectory in your zip file.

    path_backup and path_tempinet

    I have a database that all of the tables are setup so the database can be installed in any directory.
    Not sure what you mean. If all tables and their support files are in the same directory or below, the application is as portable as it can be with the exception of hard coded scripts.

  3. #3
    Member
    Real Name
    Steve Hall
    Join Date
    May 2005
    Location
    Dallas, TX
    Posts
    217

    Default Re: Alpha won't let me duplicate tables as relative file paths

    Hey Stan,
    I removed all but 2 tables in the test file. Basically, I am having the exact same problem on both my home machine and my office machine.

    When I try to create a table that has a relative file path, or duplicate either the path_backup or path_tempinet files, I get an error, or Alpha also decides not to see my tables. Do that make any sense?
    Steve Hall

  4. #4
    VAR
    Real Name
    Cheryl Lemire
    Join Date
    Jul 2003
    Location
    Pembroke Pines, FL
    Posts
    2,914

    Default Re: Alpha won't let me duplicate tables as relative file paths

    Hi Steve,

    Why don't you just copy the actual table files into your new location, open your new db, add the table, and then rename it? Unless I am missing what you are trying to accomplish here?
    Cheryl
    #1 Designs By Pagecrazy
    http://pagecrazy.com/

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

    Default Re: Alpha won't let me duplicate tables as relative file paths

    Quote Originally Posted by spain246 View Post
    Hey Stan,
    I removed all but 2 tables in the test file. Basically, I am having the exact same problem on both my home machine and my office machine.

    When I try to create a table that has a relative file path, or duplicate either the path_backup or path_tempinet files, I get an error, or Alpha also decides not to see my tables. Do that make any sense?
    I was able to create a duplicate with no issue in V8 (don't have v7).

  6. #6
    Member
    Real Name
    Steve Hall
    Join Date
    May 2005
    Location
    Dallas, TX
    Posts
    217

    Default Re: Alpha won't let me duplicate tables as relative file paths

    Okay, what I am trying to do is create a new table with a relative (not absolute) file path. I want the user to be able to install my application in whatever directory he or she chooses. For housekeeping purposes, I have put all of the tables in a subdirectory of my database called "Data".

    Picture 1-1 shows the properties of one of my tables that has a relative file path. (See attachments)

    All of my other tables are listed the same. To keep continuity, I need my new table to have a relative file path.

    Here are the steps I have taken:

    Attempt #1

    1. I want to duplicate the path_tempinet.dbf file, so I right-click on it and select ultilities->dulipcate.

    2. When the Duplicate Table menu pops up, I select Browse (since I want my new table to have a relative file path) and I specify a path and table name of data\path_tempinet2.dbf. (Pic 1-2)

    3. Then I click "Okay" and it takes me back to the Duplicate Table Menu and it shows the file path I want of data\path_tempinet2.dbf and click ok and it creates my new table.

    4. When I look at the properties of the new table, it is showing an absolute file path vs. a relative file path. (Pic 1-3)

    5. So I can check to see if this is an A5v7 glitch, I close my database, and change the name of my database folder.

    6. When I reopen my database, my newly created table is now translucent (Pic 1-4) and when I right-click on the table, the only available option is to drop the table from the database (Pic 1-5).

    7. As this is a new directory, and my new table has an absolute file path, I am now unable to access my new table.

    Attempt #2

    1. I then make a copy of the path_tempinet.dbf file in my table storage directory and I cann is path_tempinet2.dbf.

    2. I open Alpha, and I Right-Click to add a table to the datase.

    3. I select the "copied" table that I want to add to the database.

    4. My new table is added to the database. However, it is also added with an absolute file path. Another negative is that it seems to lose the link to all of the rest of my tables and turns them translucent. (Pic 2-1)

    5. I restart the database and it finds the links to all of my tables. However, when I change my main database directory again, it turns my new table translucent, and now it only gives me the option to drop the table.

    Attempt #3
    1. I try the same thing as I did on attempt 1 but with a change. The only difference in this attempt is that I go further and instead of typing in the path plus the file name, I actually select it.

    2. Of course, after selecting my new file name, it shows the absolute file path. When I hit okay on the Duplicate Table Menu, I get an error. (Pic 3-1)

    3. The new table is never generated.

    I have created all of my other tables using this method to create Relative file paths, and I have never had a problem until yesterday.

    If anyone has any ideas (or if this fixes itself in v8), please let me know. I am stuck not being able to update my database. It looks like a bug to me, but I have a sneaking suspicion that Alpha won't fix it.
    Steve Hall

  7. #7
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,643

    Default Re: Alpha won't let me duplicate tables as relative file paths

    Quote Originally Posted by spain246 View Post
    Okay, what I am trying to do is create a new table with a relative (not absolute) file path. I want the user to be able to install my application in whatever directory he or she chooses. For housekeeping purposes, I have put all of the tables in a subdirectory of my database called "Data".
    For portability purposes, if you kept the tables/sets in the database directory you would have what you want.

    So does the housekeeping purpose out weigh the portability issue?
    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.

  8. #8
    Member
    Real Name
    Steve Hall
    Join Date
    May 2005
    Location
    Dallas, TX
    Posts
    217

    Default Re: Alpha won't let me duplicate tables as relative file paths

    Hey Al,
    I thought about that, and I suppose I can ditch the housekeeping stuff. The only problem I have is there are a lot of tables. I should just be able to move everything, drop, and re-add the tables (with all of my corresponding reports coming over with my dictionary files). I wanted to do that as a last resort, but it seems that I may not have a choice.
    Steve Hall

  9. #9
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,643

    Default Re: Alpha won't let me duplicate tables as relative file paths

    Steve

    You can use xbasic to drop and add tables/sets to a database and therefore change the location of the tables/sets.

    Instead of using the duplicate route, I'd use the database functions like load_adb_def() or other db functions found in the help file (under database functions). The db functions of list_files_in_database(), file_add_to_db(), file_drop_from_db() could play a large role in what you are trying to do...

    On the other hand, I have no idea what you are doing with the 'housekeeping functions' that you mention, so I can't evaluate what the results are versus the intent. I do use sub directories under my database directory where many of the files of an application go. The files just aren't the tables/sets.

    I avoid fighting the model that a software package uses, unless I'm convinced that the model doesn't fit. That's not always the right approach, but life is about picking the right battles and then approaching the 'fight' properly.
    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.

Similar Threads

  1. Replies: 10
    Last Post: 06-13-2007, 07:59 AM
  2. Relative file paths
    By csda1 in forum Archived Wishlist
    Replies: 0
    Last Post: 09-01-2005, 06:59 AM
  3. Changing set locations to Relative File Paths
    By spain246 in forum Alpha Five Version 6
    Replies: 3
    Last Post: 08-23-2005, 01:53 PM
  4. Import and relative file delete
    By spain246 in forum Alpha Five Version 6
    Replies: 13
    Last Post: 06-02-2005, 10:11 AM
  5. file paths
    By Mary ellen decker in forum Alpha Five Version 4
    Replies: 5
    Last Post: 09-25-2000, 12:52 PM

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
  •