Results 1 to 4 of 4

Thread: Winsock Control

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    10
    Please Help!

    I have created a client program in VB6 SP3 which scans the local computer for all .EXE and .COM files on all fixed disks and stores them in an array. I also get disk sizes, memory, Windows version, IP Number etc.

    Using the winsock control(TCP/IP) on a server program I listen for the client to send this information as one continous string. Then write the data into an Access database. As a test I write it into a list box to check the data.

    The problem is that the string arrives at the server in a different order than it was sent with some data missing.

    If I limit the file list to 200 files then it works perfectly, but even if I breakdown the original list into smaller chunks I get the same problem.

    Any Suggestions?

  2. #2
    Fanatic Member Dim's Avatar
    Join Date
    Jul 2000
    Posts
    620
    Do you combine it all into a string on the client side, or is it combined as it's being transfered...if that's the case then i would suggest putting a waitng sequence into effect to allow operations to occur in some kind of order. Or simply arange the string b4 transfering it. OR how about sending the data one at a time and also putting a waiting sequence (DoEvents) or (Sleep).

    Hope that helps,
    D!m
    Dim

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    10

    Smile

    I've tried a sleep on the server side to give it chance to get all the data, but I haven't tried on the client side.

    Thanks

  4. #4
    New Member
    Join Date
    Jun 2000
    Location
    Ottawa, ON. Canada
    Posts
    13
    When you are receiving the data on the server side be sure to accept it into an empty string.

    Ex.

    Dim strData As String
    .
    .
    .

    strData = ""
    Winsock.GetData strData

    If the string is not empty, you can get unpredictable results.

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