InetTransferLib error -2147219289.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tony

    InetTransferLib error -2147219289.

    Access collective,

    I am running WinNT4.0, Acc2000 SR1 and IE 6.0.
    I converted (from Acc97) and imported Dev Ashish's InetTransferLib add-in
    modules into my Acc2000 database. Using the sample FTP upload code provided
    by Dev, I can connect to my FTP server but it will not upload the specified
    file. However, it can create a non-existent directory if I set
    ..AutoCreateRem oteDir = True.

    Dev's sample code with my modifications:
    *************** *************** **********
    Sub TestFTPUpload()
    On Error GoTo ErrHandler
    Dim objFTP As FTP
    Const conTARGET = "ftp://***.***.***.*** "

    Set objFTP = New FTP
    With objFTP
    .FtpURL = conTARGET
    .SourceFile = "C:\TEMP\File_N ame.txt"
    .DestinationFil e = "/Parent_Dir/Sub_Dir/File_Name.txt"
    .AutoCreateRemo teDir = True
    If Not .IsConnected Then .DialDefaultNum ber
    .ConnectToFTPHo st "UserName", "PassWord"
    .UploadFileToFT PServer
    End With

    ExitHere:
    On Error Resume Next
    Set objFTP = Nothing
    Call SysCmd(acSysCmd RemoveMeter)
    Exit Sub
    ErrHandler:
    MsgBox Err.Number & vbCrLf & Err.Description , vbCritical + vbOKOnly, Err.Source
    Resume ExitHere

    End Sub
    *************** *************** **********

    The error I am getting is:
    -2147219289
    200 Type Set to I

    Using my local FTP client from the DOS command line, I can connect,
    cd to the desired directory, change type to binary and upload the
    file all without error. Also, the FTP server puts me in the root
    "/" directory, not a /home/user directory somewhere off root.

    In a previous posting concerning this error, I noticed the next
    command after "200 Type Set to I" was to set the PASSIVE MODE. I
    don't think my FTP server supports passive transfers as some
    accompanying documentation says to disable this setting. How and
    where can this setting be manipulated?

    Also, how can I view what is sent to and passed from the FTP client?
    While I have stepped through Dev's code, I can't say I completely
    understand all of it. I do see where apiInetGetLastR esponse captures
    what is presumably the last response from the FTP server when a
    command from the FTP object is rejected. How can I see what commands
    the FTP object is sending that may be causing the error?

    Thanks for any and all help,

    Tony
  • kasko

    #2
    Re: InetTransferLib error -2147219289.

    I have the same problem, but i i have realiced that it is a problem with
    the firewall, if i open all ports the error disapier, but i only onpen
    ports 20 and 21 ftp doesn't work.

    Comment

    • kasko

      #3
      Re: InetTransferLib error -2147219289.

      The problem is as follow:
      - first start with active ftp
      - my firewall doesn't allow the connection, becouse they are not ports 20
      or 21.
      - ftp try unsuccessfuly to change to pasive ftp.

      any idea about how to solve it?

      Comment

      Working...