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

Inet::ftp?

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

    Inet::ftp?

    Has anyone got this to work properly?

    I've managed to get the .SendFile method to work, but the .ListDirectory method does not.

    This is from the help docs:

    Code:
    dim ftp as INET::FTP
    ftp.UserName = "Fred"
    ftp.Password = "Secret"
    ftp.EnableSSL = .t.
    ftp.Host = "ftp.myserver.com"
    ftp.UsePassive = .t.
    
    dim Listing as C
    if ftp.ListDirectory(Listing, "/downloads", .f.) <> .t.
      ' error
      msg = ftp.callResult.error
    
    end if
    I receive an "Invalid variable type" error when running: ftp.ListDirectory(Listing, "/downloads", .f.)
    The code calls for a character variable which I've dimmed in my code, but still get the error.

    Code:
    dim ftp as INET::FTP
    ftp.UserName = "My User Name"
    ftp.Password = "MyPassword"
    ftp.EnableSSL = .f.
    ftp.Host = "myserver.com"
    ftp.UsePassive = .t.
    ftp.RequireValidCertificate = .f.
    
    dim Listing as C
    
    ftp.ListDirectory(Listing, "/Data_Folder", .f.)
    Perhaps I'm not seeing something here, but I'm stumped. Unless it just doesn't work as described.

    #2
    Apparently it's summat to do with the server side.
    Search this forum for FTP and you will see the threads.
    See our Hybrid Option here;
    https://hybridapps.example-software.com/


    Apologies to anyone I haven't managed to upset yet.
    You are held in a queue and I will get to you soon.

    Comment


      #3
      Been there done that Ted, did not find anything very helpful. I'm running a filezilla server and it works all day long if using the filezilla client, but I need to use xbasic methods. I found that some will work but others do not. I would prefer to use more modern methods as opposed to the less secure older functions with plain ftp.

      Robert

      Comment


        #4
        Have you looked at the JSON options?
        I don't use it but others do.
        See our Hybrid Option here;
        https://hybridapps.example-software.com/


        Apologies to anyone I haven't managed to upset yet.
        You are held in a queue and I will get to you soon.

        Comment


          #5
          That's an interesting idea, but since I know nothing about JSON, I looked at every function in the documentation and did not find anything that would indicate to me the ability to send / receive files over the internet from a desktop application using JSON. In fact I found nothing about file transfers at all other than an Amazon store function.


          If AA does not provide a JSON function for it, then it's beyond my scope right now. It's just a bit frustrating when AA puts out this code, but then it doesn't work as the document states and you gotta keep spinning your wheels to find another route. In all the searching I only found one other topic with the subject of INET::FTP and he was trying to get INET:SFTP working with poor results. If the code doesn't work, then Alpha Software should remove it from the documentation or fix it. But in this case that will probably not happen, because obviously not many people are trying to use it.

          Them's the breaks.

          Comment


            #6
            Mike Data started a similar isse and got stuck.
            What does your xbasic look like?
            See our Hybrid Option here;
            https://hybridapps.example-software.com/


            Apologies to anyone I haven't managed to upset yet.
            You are held in a queue and I will get to you soon.

            Comment


              #7
              The xbasic that does not work is posted above. I thought since the FTP.SendFile works so well, that the listing should too. I've been doing a lot of research and have discovered that some or maybe all of the problem is coming from my router. I purchased a smart router that may not be that smart after all.
              If I bypass the router, my original code works fine, with router in place it's hit and miss. Apparently the router is not always sending back the correct ip address and it loses the connection.

              Comment


                #8
                Sorry, I should have looked at that xml above.
                The only other thing I can think to try is Port Forwarding.
                I had a Draytech router which was super dooper abut had issues when connecting to my local server.
                I changed to a BT Hub and my Synology set up Port Forwarding on it automatically.
                See our Hybrid Option here;
                https://hybridapps.example-software.com/


                Apologies to anyone I haven't managed to upset yet.
                You are held in a queue and I will get to you soon.

                Comment


                  #9
                  Could you try INET::SFTP instead? Maybe that is more compatible with your server.

                  Comment


                    #10
                    INET:SFTP does not work, I'm assuming because I'm using an older version of AA12, which may be the reason I was getting the error for the INET:FTP ListDirectory method.
                    No worries, It appears to be working fine now with the old code.

                    My router does not use port forwarding but has what's called Virtual Servers. Filezilla recommends port forwarding over virtual servers and says that smart routers with virtual servers can cause this issue.

                    I also discovered in my research that my router has an FTP server built into it with authentication. You simply install a USB drive to the back of the router, setup the FTP server and you can send and receive your files there. That is working good with no issues so far, and since the files I transfer are already encrypted I'm not worried about the data being compromised.

                    Hopefully this setup will continue to work well, otherwise I will need to find a better router for FTP, which may be the Synology that Ted mentioned above. Ted, would you mind telling me what model that is?

                    Comment


                      #11
                      The Synology I mentioned is a Server, Rob - not a Router.
                      Glad you have a solution.
                      See our Hybrid Option here;
                      https://hybridapps.example-software.com/


                      Apologies to anyone I haven't managed to upset yet.
                      You are held in a queue and I will get to you soon.

                      Comment


                        #12
                        I accomplish this a slightly different way using:

                        FTP_GET_NLIST()

                        It works well for me.

                        Comment


                          #13
                          Show me using a commercial host please.
                          See our Hybrid Option here;
                          https://hybridapps.example-software.com/


                          Apologies to anyone I haven't managed to upset yet.
                          You are held in a queue and I will get to you soon.

                          Comment


                            #14
                            This is from Zebrahost and is returning the contents of the "RefDocs" directory on the Zebrahost Server.

                            ? FTP_GET_NLIST("216.81.XXX.XX","Administrator","r#e6SyXXXX","/RefDocs")
                            = 189821-18.pdf
                            189821-26.pdf
                            194998-11.pdf
                            195055-4.pdf
                            196135-1.pdf

                            Comment


                              #15
                              Now you have proven it, and I assume no additional work by Zebra, Jeff, maybe Rob can use it.
                              Nice.
                              See our Hybrid Option here;
                              https://hybridapps.example-software.com/


                              Apologies to anyone I haven't managed to upset yet.
                              You are held in a queue and I will get to you soon.

                              Comment

                              Working...
                              X