Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21090

DataArrival Unexpected Error

$
0
0
The DataArrival event is fired but when program attempts to GetData I get the following error

40006 Wrong protocol or connection state for the requested transaction or request

Code:

Private Sub ServerToServer_DataArrival(Index As Integer, ByVal bytesTotal As Long)
 Dim p As Integer
 Dim s1 As String
 
 p = ServerToServer(Index).State
ServerToServer(Index).GetData s1, vbString
  '
  '
  '
End Sub

Variable p = 6 = sckConnecting

How is this possible?

If the other server sends a message to this server then how can the other server be in the connecting state?

Viewing all articles
Browse latest Browse all 21090

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>