>What you listed is all new to me. How do you open a channel to the tcp/ip port? Is the example you listed for use in a .PRG or with an ActiveX control or what?
>
>Guy
I used the MS winsock control (mswinsck.ocx) mainly because it's free and comes already bundled with Windows.
Just register the control in VFP and drop it on a form, or instantiate it in a program, and set the Protocol, Remote Host and Port properties.
A small example:
WITH THISFORM.MySockControl
.Protocol = 0 && TCP Protocol
.RemoteHost = cRemoteServerAddress
.RemotePort = nRemoteServerPort
.OBJECT.Connect() && Must use .OBJECT since Connect is a property and a method
IF .STATE = 7 && connected!
.SendData(VariableWithDataToBeSent)
.GetData(@VariableToHoldReceivedData)
ENDIF
.OBJECT.Close() && Must use .OBJECT since Connect is a property and a method
ENDWITH
Depending on the type of server you are connecting to, you can establish a conversation via TCP/IP. I use this on a program I made to handle my ISP users were I send an Email notice when their accounts are close to be due.
R. Davila
DBA / Network Administrator
Administracion de Fomento Comercial
Gobierno de Puerto Rico
Still waiting for FoxPro for LINUX