Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to use 'GetData' method of Winsock Control in Visual Foxpro 6.0???

447 views
Skip to first unread message

凡高

unread,
Mar 17, 2000, 3:00:00 AM3/17/00
to
Hi all,
I am using the Winsock Control in Visual Foxpro 6.0 to establish a
connection and get/put data.Now I am troubled by a problem.My winsock
control has established a connection successfully and the "DataArrival"
event has been normally triggered.But when I code in "DataArrival" event
like below:
sData=""
sckServer.GetData(sData,8)
I got nothing! The length of 'sData' is always 0.The second para of
'Getdata' method means 'vbString' type. Why?
I am looking forwad your help.
Thanks a lot in advance !!!

BTW: I have acomplished it successfully with VB in same way.

Vangoph
2000.3.16

Anthony Harris

unread,
Mar 17, 2000, 3:00:00 AM3/17/00
to
Hi there,

I too had problems implementing the Winsock control in VFP after writing a
successful program in VB

Try the following code in the DataArrival event

sdata = ""
sckServer.getdata(@sdata,8,bytestotal)

this works for me!

Hope this helps

Anthony


凡高 <van...@sina.com> wrote in message news:#xXxjd7j$GA.189@cppssbbsa04...

0 new messages