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

Multiple sets of data files

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

    Multiple sets of data files

    Does anyone know how I can have one app but have multiple different sets of data? Example: writing a bookeeping/accounting application. May have 100 different sets of books each stored in their own folder. I don't want to install 100 instances of the same application. Or reinstall the 100 instances of the application each time I make some change to it. Basically I want to specify at startup the folder that contains the data set I want to work with for that session. Example:

    I have application in c:\accounting
    I have data in c:\records1 , c:\records2, c:\records 3 , c:\records4 etc.

    One time I will want to work with the data in c:\records1 and another time I may want to work with the data in c:\records4 etc.

    In the old foxpro days I would specify, on startup, the folder that contained the data I wished to work with, store it in a variable, and then everytime I would reference a table I would use that variable to point to the table in the selected folder. I find no way to do that in Alpha5. I know I can explicitly hardcode a directory path but I need to make it variable.

    #2
    Re: Multiple sets of data files

    Never tried that.
    Generally, you would have the data tables in the same folder as the adb. You can create an app with files and then copy that adb and all files to as many folders as you wish. Would that accomplish your task. You can make a desktop shortcut for each adb that is in its own folder. No variable needed.

    Only problem with this is if you change the adb in one and it needs to be done to all the adb's, it needs to be copied to all the others.

    Maybe others will better understand your question and have a better answer.
    Dave Mason
    [email protected]
    Skype is dave.mason46

    Comment


      #3
      Re: Multiple sets of data files

      I have an app where there are 30 different hospitals, all in their own folders, all with the same adb. I have a separate adb that opens with the ability to choose which of them to open. You will need to study the documentation for opening one adb from another - very quick and very simple. I have one of them where I make changes, and then a dos batch file that applies the changes to all of the 30 folders. To apply the changes, I copy everything but the dbf's, the fpt's, and the cdx's.
      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: Multiple sets of data files

        Thank you David - I wanted to get away from updating the application files to each folder. And Martin thank you too - I was thinking along those lines. Maybe my Startup Application could check to see if the files in each individual folder are up-to-date before copying the application files. Espicially because the folders are never constant so I cannot just apply a static list to the batch file.

        Again, thank you guys.

        Comment


          #5
          Re: Multiple sets of data files

          I figured a way to let the user select the folder that contains the data he wants to work with by using the ui_Browse_for_folder function and the :a5.load function. Then tst for existence of the main adb file. Now just trying to figure out a way of updating the application files if they are not up to date in ach of the working folders. I could use a batch file but I'm a stubborn fool and figure there must be some way to do it in Alpha5!! Without issuing 30 hardcoded file_copy commands!

          Comment


            #6
            Re: Multiple sets of data files

            If the adb is the same in all folders, and the only difference is the data, then using a batch file is a snap, and fires in a very short length of time. In my own case, the adb is the same in all hospitals, BUT - I handle some individual differences for some of the hospitals with code. I'm not sure if we are talking about the same thing. I don't have 30 different actual locations - only one, but with 30 different folders.
            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: Multiple sets of data files

              Martin

              Are you saying you have 30 folders with 30 adb's in them(1 each) that are the same, just the tables, fpts and cdx files are f=differetn(due to data)? You are using an adb in the main folder with something like a menu so the user can choose which folder with adb the user wants to go to? You use one of the adb's to make changes to the code, etc and then copy to each of the other 30 folders?

              Smart way to do it. Can I ask why you don't use alpha code in that main folder adb to copy instead of a bat file?
              Dave Mason
              [email protected]
              Skype is dave.mason46

              Comment


                #8
                Re: Multiple sets of data files

                the bat file is much much faster - and when I update the main adb, I would always want to update ALL the others - if for no other reason than to keep them all the same.
                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: Multiple sets of data files

                  Martin,

                  A peek at your bat file code would be very handy. For instance, do you hardcode the filenames, or use batch commands to build some sort of a list?

                  Comment


                    #10
                    Re: Multiple sets of data files

                    I have a transport folder, which I update with a batch file, from the master adb. This contains all but the dbf's, fpt's, and cdx's. (I handle table changes with code in the autoexec file.)



                    Then, I have a batch file with one line for each folder - like

                    xcopy "c:\transport\*.*" "c:\folder1\*.*" /y
                    xcopy "c:\transport\*.*" "c:\folder2\*.*" /y
                    etc.

                    So, first I update the transport folder with a batch file, and then run the 2nd batch file that updates all the individual folders.
                    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


                      #11
                      Re: Multiple sets of data files

                      PS:

                      the batch file for updating the transport is like:

                      xcopy "C:\masteradb\*.*" "c:\transport\*.*" /y
                      del "c:\transport\*.dbf"
                      del "c:\transport\*.jpg"
                      del "c:\transport\*.etc"
                      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


                        #12
                        Re: Multiple sets of data files

                        Thanks.

                        Comment


                          #13
                          Re: Multiple sets of data files

                          If the application is not multi user I could suggest making the app work with shadow tables.
                          The actual dbf with their ddx & cdx only reside in their own folders. Switch the ADB to point at any one.
                          The development system keeps all forms, reports, sets, pdfs, adb, temp dbfs.. etc.

                          Can work for multiple users with planning.
                          With 100 data folders, adding new ones requires only adding a new folder and tables .

                          Call a fairly simple function with the folder name as the parameter. that function could also display the pointer in the title bar.
                          With either method you want to have a reasonably mature app. otherwise taking care of duplicating table structure changes is burdensome.

                          I use this - with 3 different companies I administer on one pc - plus one as a development one for testing and trying stuff out for clients.

                          Maybe not for everyone, but worth a mention.

                          Comment


                            #14
                            Re: Multiple sets of data files

                            hmmm....
                            If you never add / remove tables or fields then it may work to use the A5 Tools->zip-files and select just the application files to zip... Then unzip the file to the folders where the various different data sets live. A batch file could be used to do this if the folders are located on a single computer or network...
                            BUT
                            If you change tables THIS WILL NOT WORK...
                            You have copy the new or changed tables over to each 'data folder', along with the application files.

                            Comment


                              #15
                              Re: Multiple sets of data files

                              Hi Martin,
                              I take it none of the 30 hospitals has ever requested a customized form, report or an additional field? Because you did mention table changes - wouldn't that affect the layouts too?
                              Robin

                              Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

                              Comment

                              Working...
                              X