Login  
Search All Forums
Dart Home | PowerTCP Emulation for ActiveX | Custom Development Reply | PowerTCP Emulation / Telnet for ActiveX Topics | Forums   
AuthorForum: PowerTCP Emulation / Telnet for ActiveX
Topic: Error when I run the code
Beula

From: Singapore, Singapore
Posts: 24
Member Since: 09/01/04
posted September 3, 2004 5:14 AM

This is the error message which I am getting when I run the vb code.

Error:Run-time error '10060':

the connection has been dropped because of a network failure or because the peer system failed...

The code is simple

Private Sub Command1_Click()
  Dim telnetObj As DartTelnet.Telnet
  Dim count As Long
  Dim Data As String
  Set telnetObj = New DartTelnet.Telnet
  telnetObj.Timeout = 5000
 
  telnetObj.Connect "server"
  count = telnetObj.Search(Data, "Login :")
 
  telnetObj.Send "user" & vbCrLf
 
  telnetObj.Send "myreport" & vbCrLf

  ' get the report output; terminates with a double line

  count = Telnet1.Search(Data, vbCrLf & vbCrLf)

  Text1.Text = Data ' put the report into an text box for viewing

' close the connection

  telnetObj.Close
End Sub


But when I try to run the telnet from the command prompt, i am able to get connected. kindly let me know what should be done to resolve this.

Thanks
Beula
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted September 3, 2004 9:03 AM

There are 5 possible places in your code where that error could occur. Which line causes the error?
Beula

From: Singapore, Singapore
Posts: 24
Member Since: 09/01/04
posted September 5, 2004 10:01 PM

error in this line:

count = telnetObj.Search(Data, "Login :")
 

thanks
Beula
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted September 6, 2004 1:33 AM

I see two possible causes:

1) You have a space after the "n" and before the ":" That would be my first choice for the cause.

2) Maybe the server actually sends "login" instead of "Login"

Reply | PowerTCP Emulation / Telnet for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX