Results 1 to 13 of 13

Thread: iNet control

  1. #1
    chenko
    Guest
    When I click on Command2 I get a "Run time error '35754'; Unable to connect to remote host"

    What am I doing wrong?

    Code:
    Private Sub Command1_Click()
    With Inet1
       .Cancel
       .Protocol = icFTP
       .RemotePort = 21
       .URL = "ftp.host.com"
       .UserName = "username"
       .Password = "password"
    End With
    End Sub
    
    Private Sub Command2_Click()
    Inet1.Execute , Text1
    End Sub
    Thanks,
    Si

  2. #2
    Banned
    Join Date
    Feb 2001
    Location
    Back to sh*tland
    Posts
    294
    Doesn't it need ftp://etc.com?

  3. #3
    chenko
    Guest
    Not sure but I still get the same error

  4. #4
    chenko
    Guest
    Just bringing it back to the top........

  5. #5
    Matthew Gates
    Guest
    You are using the Execute property the wrong way, I believe.


    Inet.Execute "http://www.somewhere.com/index.html", "GET"

  6. #6
    Addicted Member Active's Avatar
    Join Date
    Jan 2001
    Location
    Lat: 13° 4' 46" N, Long: 80° 15' 20" E
    Posts
    209
    Originally posted by chenko
    When I click on Command2 I get a "Run time error '35754'; Unable to connect to remote host"

    What am I doing wrong?

    Code:
    Private Sub Command1_Click()
    With Inet1
       .Cancel
       .Protocol = icFTP
       .RemotePort = 21
       .URL = "ftp.host.com"
       .UserName = "username"
       .Password = "password"
    End With
    End Sub
    
    Private Sub Command2_Click()
    Inet1.Execute , Text1
    End Sub
    Thanks,
    Si

    This means you have to click Command1 before you click Command2. Did you do that ??
    If you can't beat your computer at chess, try kickboxing !!!
    [Download Tag Editing Tools.]

  7. #7
    chenko
    Guest
    Originally posted by Matthew Gates
    You are using the Execute property the wrong way, I believe.


    Inet.Execute "http://www.somewhere.com/index.html", "GET"
    Im using this for FTP.

    Forgot to say
    Text1 = "GET file.htm c:\windows\desktop\file.htm"

    Active: Of course

  8. #8
    denniswrenn
    Guest
    Are you sure you're using the correct address and login information? it worked fine for me..

    Code:
    Private Sub Command1_Click()
    With Inet1
       .Cancel
       .Protocol = icFTP
       .RemotePort = 21
       .URL = "promasc.com"
       .UserName = "*******"
       .Password = "********"
    End With
    End Sub
    
    Private Sub Command2_Click()
    Inet1.Execute , _
    "GET index.htm C:\Windows\Desktop\index.htm"
    
    End Sub

  9. #9
    chenko
    Guest
    Yep, im sure they are right, Ive check loads of times, And ive connected thru my FTP client and the host isnt down

  10. #10
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    I've had a simular problem once with the INet control.
    Don't ask my why but try to asign the value from the textbox to a string and pass that to the Execute method.
    Code:
    Private Sub Command2_Click()
        Dim sCmd As String
    
        sCmd = Text1.Text
        Inet1.Execute , sCmd
    End Sub
    Best regards

  11. #11
    chenko
    Guest
    That dosnt work either

  12. #12
    Member
    Join Date
    Feb 2001
    Posts
    57
    It sounds like you might be using a proxy server. I get the same error when working behind a proxy. You need to set the Inet control to access the site through your proxy.

    chilibean

  13. #13
    Lively Member
    Join Date
    Jan 1999
    Location
    Karjalohja, Finland
    Posts
    123
    Try this way:

    Private Sub Command1_Click()
    With Inet1
    .Protocol = icFTP
    .RemotePort = 21
    .URL = "ftp.host.com"
    .UserName = "username"
    .Password = "password"
    End With
    End Sub

    Remove Cancel command...

    -Dj4

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width