?
Solved

Winsock Doesn't Send Data

Posted on 2003-03-10
4
Medium Priority
?
238 Views
Last Modified: 2013-12-25
Following is my Code used to send the Data from Server to Client.

Private Sub wsSocket_DataArrival(Index As Integer, ByVal bytesTotal As Long)
Dim sItemData As String
Dim strData As String
Dim strOutData
Dim strConnect As String
Dim mRep
Dim mRecordCount As Double

' get data from client
Me.wsSocket(Index).GetData sItemData, vbString
mRequestNo = Val(sItemData)
sServerMsg = "Received: " & mRequestNo & " from " & Me.wsSocket(Index).RemoteHostIP & "(" & sRequestID & ")"
Me.Text1 = " "
Me.Text1 = sItemData 'This is the SQL Query send by Client
Call subExecuteQuery 'It executes the Query and creates recordset(mRSTemp)

mRep = Split(mRSTemp.GetString, Chr(13))
mData = ""
For i = LBound(mRep) To UBound(mRep)
    wsSocket(Index).SendData mRep(i)
    mRecordCount = mRecordCount + 1
Next
end sub

Here the query is received by server and it is executed, even the loop is also executed but the client is not able to receive the data from the statement for sending data in For Loop. Kindly guide why SendData command is not being executed within loop.

If i am sending the whole recordset as one buffer say of 60000 bytes the client is receiving only 1800 bytes. why?

Thanks
Hiren
0
Comment
Question by:hiren_d_in
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 3

Expert Comment

by:y2ksw
ID: 8120144
wsock sends only strings or byte arrays, no variants.
0
 
LVL 1

Accepted Solution

by:
a3b2c1r46 earned 80 total points
ID: 8261646
Winsock is limited in the amount of data it will transfer at once usually the MTU of the network (ethernet around 1500 bytes). You will have to have the server loop through the data sending it a chunk at a time and have the client rebuild it.
0
 
LVL 6

Expert Comment

by:GPrentice00
ID: 9053219
This question has been classified as abandoned.  I will make a recommendation to the moderators on its resolution in a week or two.  I would appreciate any comments by the experts that would help me in making a recommendation.

It is assumed that any participant not responding to this request is no longer interested in its final deposition.

If the asker does not know how to close the question, the options are here:
http://www.experts-exchange.com/help/closing.jsp

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER

GPrentice00
Cleanup Volunteer
0
 
LVL 6

Expert Comment

by:GPrentice00
ID: 9116507
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

 -->Accept a3b2c1r46's comment as Answer

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER

GPrentice00
Cleanup Volunteer
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month10 days, 1 hour left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question