Alpha Video Training
Results 1 to 19 of 19

Thread: The inevitable has happened

  1. #1
    Member
    Real Name
    Tom Lyon
    Join Date
    Apr 2000
    Posts
    610

    Default The inevitable has happened

    Someone accidentally overwrote the source database here with their network optimized version.
    I have a backup from 3am this morning, but today's additions/changes appear to be gone. Does anyone know how to recover from such a mess?

    Tom Lyon

  2. #2
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,307

    Default RE: The inevitable has happened

    I'm sure you verified that the shadow tables are actually located in the source folder, and not in a subfolder? It would be hard to tell if you just looked at the tables through Alpha Five. But then the doggone thing would work, albeit slowly, right? Guess I just answered my own question. I'm sorry to say I don't have any other ideas.

    -- tom

  3. #3
    VAR Dan Blank's Avatar
    Real Name
    Dan Blank
    Join Date
    Apr 2000
    Location
    Fort Worth, TX
    Posts
    995

    Default RE: The inevitable has happened

    Just a guess but since you have a back up, what if you just replaced the *.ddd, *.ddm, and *.ddx. and then the *.adb, *.alb, and the *alm??

    If you left the *.dbf files unchanged wouldn't you still have your data?

    Any way just a thought. Sorry, I don't have a better answer.

    Dan

  4. #4
    "Certified" Alphaholic
    Real Name
    JohnZaleski
    Join Date
    Oct 2000
    Posts
    1,736

    Default RE: The inevitable has happened

    INCLUDE THE SET DICTIONARIES WITH THAT. EXTENSIONS BEGINNING WITH "S" THINK ITS SEM-SEX-SET. IF THERE IS A GOOD BACKUP OF THESE FILES, IT SHOULD WORK WITH THE SUPPOSEDLY INTACT DATA.

  5. #5
    Member
    Real Name
    Tom Lyon
    Join Date
    Apr 2000
    Posts
    610

    Default RE: The inevitable has happened

    Thanks for the assist, people.

    Unfortunately, once a set of shadow files overwrites the source data files, things just aren't the same anymore. dbf files become like shortcuts to the source dbf files. In this case, they are one and the same, so the source file is now gone..poof..disappeared from the 3rd rock from the sun.

    I'm just a little miffed as to why it is possible to overwrite source with shadow. Sure, users need to follow rules and operate within the confines of allowed practices, but these are computers with which we are dealing. We should be able to *prevent* the inevitable from even happening.

    I think this particular procedure needs some work. It would be very easy for a novice to wipe out a database into which they've put many long hours of work. I'd like to see something like a path definition for shadow files. If not set, then no refresh can occur. If that path is set, let it be set only by the administrator/author of the database.

    Luckily, I'm a fanatic about making backups. Once again, backups come to the rescue.

    I, for one, will be removing the optimize/shadow refresh from my menus and :controlpanel.hide() will become standard practice. No one to blame but myself on that one. Even using the runtime version doesn't prevent this. Hope everyone is cautious about network optimizing.

    Tom Lyon

  6. #6
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,307

    Default RE: The inevitable has happened

    Since Alpha Five 'knows' whether it's opening the source tables it 'knows' whether network optimize is possible. When not possible the option to network optimize is greyed out.

    I agree that it would be nice to have a failsafe built in to prevent the user from selecting the source table directory as the 'destination' for a network optimize operation. This shouldn't be too tough since Alpha Five already knows where the source tables are located, to begin with.

    At minimum we need a 'hook' into the process so that, through xbasic, we can validate the user's choice before letting it rock and roll.

    Your experience reminds me of something similar which happened to me. Two days after installing my application and just after training was finished, one of my users wiped out my primary data table, too. My app permits them to copy selected records to a file for use with external fax and word processing programs. The user just happened to 'pick' the exact filespec for my primary table as the name and location for his copy! Worked like a charm. Wiped it clean out, replacing 4500 records with 30.

    -- tom


  7. #7
    "Certified" Alphaholic
    Real Name
    Finian Lennon
    Join Date
    Apr 2000
    Location
    Atlanta, GA
    Posts
    1,803

    Default RE: The inevitable has happened

    Hi Tom:

    I feel your pain but .....

    this didn't happen as a result of anything a user did within Alpha did it? More likely an errant copy operation in Explorer? Perhaps you should limit access to Explorer in the Registry settings.

    I stop refresh_shadow operations, other than on a workstation, by using the GetMachineName function that you can find at www.learnalpha.com. This prevents the script from running on the server where, potentially, it could do harm.

    Finian

  8. #8
    Member
    Real Name
    Tom Lyon
    Join Date
    Apr 2000
    Posts
    610

    Default RE: The inevitable has happened

    It was from within Alpha Five. I'd allowed the user to refresh shadow as needed. Unfortunately, I didn't script the entire operation, but rather let Alpha Five do its thing. I am not even sure it can be scripted, can it?

    Tom Lyon

  9. #9
    Member
    Real Name
    Tom Lyon
    Join Date
    Apr 2000
    Posts
    610

    Default RE: The inevitable has happened

    Hey, it saved you a lot of disk space :)

    The pain doesn't hurt quite as badly if I laugh about it now

    Tom Lyon

  10. #10
    VAR csda1's Avatar
    Real Name
    Ira J Perlow
    Join Date
    Apr 2000
    Location
    Boston, Massachusetts, USA
    Posts
    3,530

    Default RE: The inevitable has happened

    Tom,

    One of things that I check for when people are copying or exporting data is that they are not writing to the same folder as the application folder. This folder should not have anything but the original application that was installed. User's just love to clutter it up with temporary files.

    If you want to conditionally allow them to write there, prompt them 1st with a warning. Of course there is not much you can do if someone wants to copy a file outside of A5.

    In most cases, the default should either be My Documents, or the private directory. You may want it to always be the same default. However, for most prompts, after the initial selection, the last used selection remains either throughout the A5 session, or for some cases, for all invocations of A5 as I choose it to operate.

    (These values are either in global variables or a stored value in the private directory. In some cases, it might be the real database directory for those values shared by many users.)

    Regards,

    Ira J. Perlow
    Computer Systems Design & Associates
    csda@mediaone.net

  11. #11
    VAR csda1's Avatar
    Real Name
    Ira J Perlow
    Join Date
    Apr 2000
    Location
    Boston, Massachusetts, USA
    Posts
    3,530

    Default RE: The inevitable has happened

    Tom,

    See the code section for an example. I'll be updating the last version I posted with a newer one today that fixes a few issues.

    Regards,

    Ira J. Perlow
    Computer Systems Design & Associates
    csda@mediaone.net

  12. #12
    Member
    Real Name
    Tom Lyon
    Join Date
    Apr 2000
    Posts
    610

    Default RE: The inevitable has happened

    I came. I saw. I wowed. Nice stuff there, Ira. I'm anxiously awaiting your update!

    Tom Lyon

  13. #13
    VAR
    Real Name
    Martin W. Cole
    Join Date
    Apr 2000
    Location
    Terrell, Texas (near Dallas)
    Posts
    5,949

    Default RE: The inevitable has happened

    Finnian, where might I find information regarding restricting the user from changing settings?

  14. #14
    VAR csda1's Avatar
    Real Name
    Ira J Perlow
    Join Date
    Apr 2000
    Location
    Boston, Massachusetts, USA
    Posts
    3,530

    Default RE: The inevitable has happened

    Tom,

    The 2nd version I posted (Optimize1.zip) is the "final" version. However, the one addition I would make is to force a full optimization even if the shadowed database is active.

    Thus if you were in the shadowed version, you'd want to change to the path and database of the non-shadowed version and run a full optimize. The problem is getting to the non-shadowed database using sendkeys (to effectively open a new database) seems to cause global functions and inline basic of the changed to app to fail for some reason. Nevertheless, I think the autoexec script does work, and hence placing code in the autoexec to run the full net optimize after switching to the non-shadowed version (based upon a flag like "OptNet.TXT") might just work. The following code works (with the above problems still in it) to change to a new application


    function RunApp as L(AppName as C)
    ' Changes to new database passed in AppName

    frm=obj(A_FORM_CURRENT)
    frm.minimize()
    :controlpanel.show()
    :controlpanel.minimize()
    :controlpanel.activate()

    sys_send_keys("{%F}{RIGHT}{LEFT}{DOWN}O"+AppName+"{ENTER}")

    END

    end function


    Regards,

    Ira J. Perlow
    Computer Systems Design & Associates
    csda@mediaone.net

  15. #15
    "Certified" Alphaholic
    Real Name
    Finian Lennon
    Join Date
    Apr 2000
    Location
    Atlanta, GA
    Posts
    1,803

    Default RE: The inevitable has happened

    I was referring to things like the Windows Explorer etc .. these settings are all controllable from the Registry. I used the "Win 95 Secrets" book to figure out how to remove things like Network Neighborhood and other options from a users desktops at one client.

    Finian

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

    Default RE: The inevitable has happened

    As I mentioned to Ira before, I couldn't get sys_send_keys to work but I did have a way to reliably start another application. Your questions prompted me to look it up.

    Attached is a "Launcher" that I've used in the past to start multiple A5 apps. It uses the following script on the "OnDoubleClick" event of the browse table to open another A5 window with the new application running:

    app = parentform:Browse1:Db_Name.text

    sys_shell( "D:\a5v4\alpha5.exe "+app+" -title="+parentform:browse1:app_name.text)

    END

    In this case, "D:\a5v4\alpha5.exe" is the full pathname of my A5 executable but this could easily be "calculated" by the program. In fact, some of the directory variables Ira created may have already done this.

    Of course, the "-title=" is not required but it helps in the "launcher" because the name will then appear in the button on the Win98 task bar.

    Adding :A5.close() to a line just before the END statement will close the current application and A5 window leaving only the new app. (For my "launcher" I wanted to keep the launcher open so I could go back to it via the Win98 task bar and start another app.)

    I haven't had the time to work on adding this to the script Ira and I have been 'collaborating' on but it shouldn't be too difficult.

    Cal

  17. #17
    VAR csda1's Avatar
    Real Name
    Ira J Perlow
    Join Date
    Apr 2000
    Location
    Boston, Massachusetts, USA
    Posts
    3,530

    Default RE: The inevitable has happened

    Cal,

    This method may work for this need as all you are going to do is open the new app just to run the optimization and then close it. I probably would minimize the new application for a couple of reasons.

    1. Unfortunately, startup icon, splash, title etc startup options will not be the same as as your current invokation of A5. Of course this could be specified on the command line, but it requires you to specify something that you should not need for the purposes of doing a full optimization from the shadowed version (in order to make it generic). You don't want them to see A5 icon or titles, do you?

    2. There will probably be a lot of flashing.

    I think my method will work, but I sort of hate to imbed the optimization code into the AUTOEXEC script (I would probably just copy it verbatim as an inline function). I think it would be more generic and eliminate the above problems. I will be checking it out in the next couple of days

    Regards,

    Ira J. Perlow
    Computer Systems Design & Associates
    csda@mediaone.net

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

    Default RE: The inevitable has happened

    Tom, I join you. This evening, while installing the runtime on a computer, I accidentally copied the shadow over the source, wiping out all of today's work. Fortunately, I backed up last night. But, wait till my bookkeeper finds out tomorrow morning!

    PS: I don't understand how this happended. I installed the runtime, loaded the app, selected Network Optimize, selected (what I thought) was the shadow folder, and clicked OK. I suspect that the displayed folder was the source, not the shadow - but, I didn't navigate to it. From now on when setting up the shadow on a new computer, I'm *copying* the shadow from another computer, period.

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

    Default RE: The inevitable has happened

    Peter, if you use the script Ira finalized under the "Code Archive"/"Automated Network Optimize", that won't be a problem anymore.

Similar Threads

  1. Whatever happened to V7 ??
    By Jason Edwards in forum Alpha Five Version 6
    Replies: 1
    Last Post: 07-25-2005, 05:00 PM
  2. What happened to Print Group Icon
    By debwelch in forum Alpha Five Version 5
    Replies: 9
    Last Post: 09-10-2003, 06:27 AM
  3. What happened?
    By Fred Daniel in forum Alpha Five Version 5
    Replies: 1
    Last Post: 06-23-2003, 06:38 AM
  4. What happened to RANGES?
    By Fred Daniel in forum Alpha Five Version 5
    Replies: 4
    Last Post: 03-28-2003, 02:50 PM
  5. What Happened To The Board
    By Phil Rolf in forum Alpha Five Version 4
    Replies: 3
    Last Post: 05-22-2000, 10:47 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
  •