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

doing maintenance on a different adb

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

    doing maintenance on a different adb

    I have a situation where I have currently 21 different facilities, each in its own folder, and each having exactly the same adb, just different data. Because we are using T/S, none are shadowed.

    What I need to do is every morning, at maybe 5:30 AM, open each of the facilities and run maintenance - which would include both operations and scripts. I'm currently thinking about a good approach.

    And currently, I'm thinking about making a separate program that would run from a windows scheduler, that would open each of the 21 facilities (one at a time) and put everything within a single function that would run the needed maintenance and then go back to the original main program, and run the next one.

    Has anyone ever done this or have any ideas?
    Cole Custom Programming - Terrell, Texas
    972 524 8714
    [email protected]

    ____________________
    "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

    #2
    Re: doing maintenance on a different adb

    Maybe??

    I have run a seperate adb on the same stuff like;

    my sales adb has a duplicate called work.adb except it is only used for maintenance. all the same scripts and everything are in work.adb. It has a different autoexec, Now, in the autoexec of this one adb that does all the maintenance i need. It shuts itself off when it is complete. You could have it call the next work.adb in another folder(then the next then...)?

    That could be set up to run on startup if you wished and it would round robin until complete.

    Just a thought.



    .
    Last edited by DaveM; 09-30-2009, 06:10 PM.
    Dave Mason
    [email protected]
    Skype is dave.mason46

    Comment


      #3
      Re: doing maintenance on a different adb

      I have a setup like that with one of my clients, a hospital. There are 2 adb's in the same folder with all the same files, but a different autoexec, etc.

      I've got it working if I open it directly. Now I've got to figure out how to run it from a completely separate folder

      am going to toy with this approach:
      have a table in the "maintenance" adb/adb_folder that has the last date each of the other adbs were updated

      1 the maint loads from a scheduler
      2 checks the first date in the table that is less than today
      3 loads that adb (which closes the maintenance adb)
      4 at the end of the maint run, have the called adb update the record in the maint adb, and then load the maint adb (which closes the called adb)
      5 as long as it can find a record in the table with a date less than today, it keeps running

      else, it exits

      One thing I have noticed, unless I open a form and run the maintenance function from the form, I have to keep clicking on it to keep it going - but is no big deal - am just running it from a form
      Cole Custom Programming - Terrell, Texas
      972 524 8714
      [email protected]

      ____________________
      "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

      Comment


        #4
        Re: doing maintenance on a different adb

        Martin,

        What is it updating?? Is it a date in a table??

        How many tasks have to be completed in each adb??

        I don't understand having to keep clicking to keep something going. That just does not sound right. A function should be able to run without clicking more than one time.???.

        The maintenance adb I was describing is an exat duplicate of the main adb except for the autoexec script.

        The autoexec should be able to call the function/form/other and then call another maintenance.adb in another folder and then shut itself down on completion.


        .
        Dave Mason
        [email protected]
        Skype is dave.mason46

        Comment


          #5
          Re: doing maintenance on a different adb

          Martin:

          Our server setup is somewhat similar so maybe this app will give you some ideas. It runs an "Update Production Index" and "Pack" of all tables contained in sub-folders of a given folder.

          IOW, if all your locations are installed in separate sub-folders of C:\Data then it will process each sub-folder and perform the requested actions. It maintains a log and shuts down on completion.

          You can install the maintenance application anywhere on the same server.

          Caveats:
          1)the maintenance code runs from the autoexec so you need to exercise care before starting it up. In the zip file, the autoexec is effectively turned off with an "End" as the first line.
          2)The top level path (i.e. the top level folder containing the sub-folders) must be hard coded into the autoexec script.
          Finian

          Comment


            #6
            Re: doing maintenance on a different adb

            thanks a million, Finnian

            All the facilities are parallel - i.e,, none of them are subfolders
            I currently have a separate (also parallel) folder/app named maintenance
            at the onarrive event of a button on its startup form, it loads a table of all the facilities, queries for ones where lastupdated < date() and loads that adb

            the loaded adb runs a function that runs several scripts and operations, and reloads the maintenance app

            it keeps looping until finished

            one problem I am having is that it runs perfectly for about 4 apps, and errors out
            if I start it again does another 4 and errors out
            like a stack issue or something
            currently, there are 21 apps to update
            I am going to study yours
            Last edited by martinwcole; 10-01-2009, 12:37 PM.
            Cole Custom Programming - Terrell, Texas
            972 524 8714
            [email protected]

            ____________________
            "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

            Comment


              #7
              Re: doing maintenance on a different adb

              It sounds like a timing issue. If there is no pause between the steps, it could be loading all the apps/steps at almost the same time. If it is trying to run 2 steps on the same table at the same time, it could error.

              Running from functions(udf) usually stop that, but not always.
              Sometimes it is necessary to put a pause inbetween.


              .
              Dave Mason
              [email protected]
              Skype is dave.mason46

              Comment


                #8
                Re: doing maintenance on a different adb

                no - it runs them one at a time
                I haven't tried running operations or scripts on a different adb
                I know how to open forms on a different adb - form@xxxx\ddd
                will experiment with that

                I'm convinced its either a memory leak or a stack issue
                Cole Custom Programming - Terrell, Texas
                972 524 8714
                [email protected]

                ____________________
                "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

                Comment


                  #9
                  Re: doing maintenance on a different adb

                  success

                  instead of reloading the maintenance adb from the facility adb, I am closing the facility adb/a5.close() and playing a batch file that loads the maintenance adb - it keeps going back and forth until all the adbs have had the maint run

                  the scheduler will run the same batch file which will start the process

                  I tried, but could not figure out the syntax to run a function on another adb without loading the adb. It may not be possible.

                  But - who cares - its working!!!!!!!!!!!!!!!!!!!
                  Cole Custom Programming - Terrell, Texas
                  972 524 8714
                  [email protected]

                  ____________________
                  "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

                  Comment


                    #10
                    Re: doing maintenance on a different adb

                    COOL
                    Dave Mason
                    [email protected]
                    Skype is dave.mason46

                    Comment


                      #11
                      Re: doing maintenance on a different adb

                      Hi Martin,

                      Originally posted by martinwcole View Post
                      I tried, but could not figure out the syntax to run a function on another adb without loading the adb. It may not be possible
                      It is not possible to run a function in another database application. However, it is possible to run a script in another adb as follows
                      Script_play("scriptname@filepath\databasename.alb")
                      Script_play_local("scriptname@filepath\databasename.alb")
                      It runs the script in the context of the current application, so it's just like it was in the current database list of scripts. This means that any variables are used and the code is run in the current version (thus, e.g. you could run a V8 piece of code while in V9).

                      Thus, you could run a script in application X, but it would be running from application Y. Any references to the database would show as Y, so anything in the code of X that references any path (implicitly or explicitly) would have to be passed variables with a full path and name to application X. This could be done by using Script_play_local() and presetting some local variables, otherwise you could use some shared or global variables (although I never recommend that).

                      Also, many Alpha Five functions and methods will/can work on external data dictionaries, although the naming structure is not always clear, nor is it documented typically. Thus, it is possible to pack and reindex without ever being in the database, as well as many other maintenance functions. In fact, you don't even need to run code from there.
                      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


                        #12
                        Re: doing maintenance on a different adb

                        Thanks Ira.

                        I've got it working perfectly - so far.

                        I have an adb called maintenance, and I have 21 folders(different medical facilities) that all have the exact same adb

                        a scheduler that will run will open a batch file that opens the maintenance app - it looks in a table for the first facility where the lastupdated field is less that today - and opens that adb

                        that adb, in the auto exec, runs the maintenance routine, calls the batch file, and closes

                        thus there is a loop that runs untill all the apps have been updated

                        then it copies all the data for the facilities to a folder called dataonly
                        then it copies that folder to a day-of-the-week folder to 2 backup locations - one on the server, and one on an external drive

                        thus I have a backup for every day of the week and in 2 locations, and all the facilities are ready for another day

                        For now that will suffice, but I am going to study Finnian's routine and your suggestions and see if I can improve on it.
                        Cole Custom Programming - Terrell, Texas
                        972 524 8714
                        [email protected]

                        ____________________
                        "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

                        Comment

                        Working...
                        X