Re: Trapping for error and displaying receive buff - WeOnlyDo Discussion board

Re: Trapping for error and displaying receive buff (General questions)

by Eric, Friday, December 07, 2007, 19:22 (6197 days ago) @ Eric

I have now added an error routine and display the error number. The number is 1460 upon each Execute. What is this number and how do I work around it?

[code]
Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click
Telnet1 = New WODTELNETDLXCOMLIB.wodTelnetDLXComClass

Telnet1.Timeout = 4

Telnet1.Hostname = textBox2.Text
Telnet1.Login = textBox3.Text
Telnet1.Password = textBox4.Text
Telnet1.Protocol = WODTELNETDLXCOMLIB.ProtocolsEnum.SSHAuto
Telnet1.Port = 22
Telnet1.Blocking = True
Telnet1.StripANSI = True

Telnet1.Connect()

On Error GoTo ErrorHandler
Telnet1.WaitFor( Select: )
Telnet1.DataReady = 0
Telnet1.Execute( T & vbLf, Select : )
Telnet1.DataReady = 0
Telnet1.Execute( e51 & vbLf, (c)Eagle Con&Dev )
Telnet1.DataReady = 0
Telnet1.Execute(vbCrLf, F4-Exit )
Telnet1.DataReady = 0
Telnet1.Execute( s51 & vbLf, Login Password? )
Telnet1.DataReady = 0
Telnet1.Execute( s51eagle & vbLf, F4-Exit )
Telnet1.DataReady = 0
Telnet1.Execute( 51 & vbLf, Select or E? )
Telnet1.DataReady = 0
Telnet1.Execute( 3 & vbLf, F4-Exit )
Telnet1.DataReady = 0
Telnet1.Execute( 3 & vbLf, Select or E? )
Telnet1.DataReady = 0
Telnet1.Execute( bkn & vbLf, F4-Exit )
Telnet1.DataReady = 0
Telnet1.Execute( wrkrb & vbLf, F4-Exit )
Exit Sub

ErrorHandler:
AddToList( Error: & Err.Number & vbLf)
Resume Next
End Sub
[/code]


Complete thread: