Results 1 to 3 of 3

Thread: Winsock Array Problem

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2005
    Posts
    2

    Winsock Array Problem

    Im trying to make a server application and having a browser access it and send data back to it. But that aint the problem. Im trying to use an Array to gather the get information and deal with it in a for loop. Iv never done this and am trying my best at it and not gettin far with this. Is there a way to fix/get around/another way to do this?

    This seems to cause an error
    Run-time Error '13'
    Type Mismatch

    VB Code:
    1. wsWWW.GetData sData, vbString
    2. wsArray = Split(sData, vbCrLf)

    Thanks in advance, Phreak Nation

  2. #2
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359

    Re: Winsock Array Problem

    Which line is causing the error? How is sData declared?
    How is wsArray declared?
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2005
    Posts
    2

    Re: Winsock Array Problem

    LoL funny thing is i think i solved it and i dont remember how, both lines are still identical and are declared the same. Here is what i am using to save people the trouble in the future
    VB Code:
    1. Dim wsArray() As String
    2.  
    3. Private Sub wsWWW_DataArrival(ByVal bytesTotal As Long)
    4. Dim sData As String
    5.     wsWWW.GetData sData, vbString
    6.     wsArray = Split(sData, vbCrLf)
    7.     For i = 0 To UBound(wsArray)
    8.         If Len(wsArray(i)) > 0 Then
    9.             ' Connection Script
    10.         End If
    11.     Next i
    12. End Sub

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