dcsimg
Results 1 to 4 of 4
  1. #1

    Thread Starter
    Lively Member sivanat's Avatar
    Join Date
    Nov 2001
    Location
    AREA-216, MARS
    Posts
    73

    Unhappy Run-time error '40006' : Wrong protocol .... <== How this error occurs?

    Run-time error '40006' :
    Wrong protocol or connection state for the requested transaction or request.

    How this error occurs?
    What error is it about?
    How can we fix this error?

    In my vb-application I used winsock and timer control.
    And set timer to run every 5 minute.
    But this error occurs unexpectially.

    Best Regards

  2. #2
    PowerPoster
    Join Date
    Nov 2001
    Location
    Trying to reach and stay in the cloud
    Posts
    2,089

    hi

    It appears u are trying to send data to a closed connection.

    This is a only guess - I am to just starting with winsock.

    I got this error when I was sending data to a close connection.

  3. #3
    Hyperactive Member Eyes.Only's Avatar
    Join Date
    Oct 2001
    Location
    Minnesota
    Posts
    344
    yea veryjohnny is right. If your winsock.state <> sckConnected then it cant send data and thus you will get that error if you try.

  4. #4
    New Member
    Join Date
    Mar 2002
    Posts
    1

    40006 error

    Sending the data when the winsock isn't connected isnt always the prob. I had the same error and eveything was sent in the sub that when the winsock was connect. Running my program overnight through the VB debug "the play icon" mode highlighted my "Winsock1.GetData temp" under the sub of data arrival. Yes... the winsock could disconnect before you get your data. To solve this i just added "If Winsock1.State <> 0 Then Winsock1.GetData temp" So check your data arrivel too.

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width