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

A5_DownLoadFile() revisited

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

    #31
    Re: A5_DownLoadFile() revisited

    Originally posted by G Gabriel View Post
    If you use table.persist() before a5_DownLoadFile():
    a-What good will that do? according to you, a5_DownLoadFile closes the table,
    <tbl_pointer>.persist() keeps the table open so that neither of the download commands, A5_DownLoadFile() or HTTP_Download(), will close it. I though this was obvious from my previous post. Without the "persist" command, both of those download commands will close the table - but only on some systems according to Selwyn.

    Originally posted by G Gabriel View Post
    b-When and how are you going to close the table?
    Just like I always do. With <tbl_pointer>.close(). Or, as Tim said earlier, "I used persist() after the table open. and it stayed open till I used close()"

    Originally posted by G Gabriel View Post
    If you put it in the loop after a5_DownLoadFile(), the table will remain open for the first loop only.
    I'm not sure what the "it" is that you are referring to. If you are talking about putting the "persist" command after the download command, telling it to "persist" after it's closed won't do much good. The persist() command has to be issued before the loop starts.

    If you are talking about putting a <tbl_pointer>.close() command inside the loop - you wouldn't do that in any other loop so why do it in this case? Wait until you are actually done using the table, then issue the .close() command. That could be immediately after the loop or, depending on what the table is used for, way past the end of the loop.

    Originally posted by G Gabriel View Post
    Has anyone tested any of these scenarios? or are all of these just abstract thinking?
    Quite frankly, I am in no mood to test any of these theories as it doesn't do me any good nor do I have the time, but for any one who cares, I suggest puttng these theories to test.
    Of course I've tested this. I usually test all new ideas before I post them. If not, then either I say they haven't been tested or else they aren't new to me. I try not to post solutions unless I'm at least 99% sure they will work. And, yes, it took a long time to test - probably a whole minute or so since it was a simple modification of the sample app posted above. I can guarantee you've spent far more time writing responses to this thread than I did testing the .persist() command.

    Can I say this solution, or any other, will work in every situation? No, but I can say it worked on my system in the situation described.

    Comment


      #32
      Re: A5_DownLoadFile() revisited

      Cal:
      It might shock, but I already knew what you have just said, except there is one little problem. The help file says:

      The <TBL>.PERSIST() method can keep the table open after the script ends, so that a subsequent script can access the table without the overhead of having to open it again.

      How does that fit into keeping the table open while the script is run? and
      If it keeps the table open after the script is run, then I repeat my question, how will you close the table? Are you going to run a different script that access and closes the table? or all of this is simply an unusual use of the function? sometimes that works.

      Comment


        #33
        Re: A5_DownLoadFile() revisited

        My experience using both a5_downloadfile() and http_download(). What I do is zip my app and then upload to my webserver. Then I am able to use either of these methods to download the zip from within my app, but ONLY if I hard code the "Taget_File". I have tried every which way to create a variable and use it instead of the hard code. I have gotten it to work very rarely.
        Code:
        if a5.Get_Master_Path() = "" then      'if not a shadowed database
            datapath = a5.Get_Path()
        else
            datapath = a5.Get_Master_Path()    
        
        I then use:   s_quote(datapath) for the Target_File.
        end if
        But, as I said, it worked once or twice, but no more. It goes thru the motion, i.e. showing filename, percent downloaded, etc. but the file isn't really being downloaded unless I hardcode the Target_File.

        Have also tried:
        Code:
        myvar = ui_get_path(.............)
        Then combine myvar+filename and s_quoted it for the Target_File. It worked once.
        Any ideas???
        Ernie

        Comment


          #34
          Re: A5_DownLoadFile() revisited

          G- I think Cals's application of the table.persist() is not what it was intended for and reading the help file you would have doubts about it working. Without knowing whats under the hood for the .persist() and the download commands it is impossible to explain why it is working but it appears it does.

          One possible theory is that the a5_downloadfile() function is being interpreted as a different script rather than being part of the current one. This still wouldn't really make sense but...

          My preferred theory is that the A5_downloadfile() uses an in-built script for closing the open tables as the help file says when a script ends it will usually automatically closes any open tables. I think the table.persist() might stop that in-built script from activating and therefore resulting in the A5_downloadfile() not closing the table.

          If you actually use the table.close() function it will override the table.persist().

          I would still be of a mind to store this one under Cals's 'scary to use category' but when needs must.

          Comment

          Working...
          X