Link to home
Start Free TrialLog in
Avatar of Mohan_Raju
Mohan_Raju

asked on

I would like get the data from sql server TCP port 1433 using winsock control


code

Private Sub Form_Load()
    winsocktest.Protocol = sckTCPProtocol
    winsocktest.LocalPort = 1433
   ' winsocktest.Listen
End Sub


Private Sub winsocktest_ConnectionRequest( ByVal requestID As Long)
    winsocktest.LocalPort = 1433
    winsocktest.Accept requestID

End Sub

Private Sub winsocktest_DataArrival( ByVal bytesTotal As Long)
    Dim sItemData As String
   
    winsocktest.GetData sItemData, vbString
    MsgBox sItemData
End Sub



I want some vb code to get remote data and localhost data in binary format

Thanks in advance,
Mohan
ASKER CERTIFIED SOLUTION
Avatar of AzraSound
AzraSound
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of lunchbyte
lunchbyte

I do not even think it is possible with winsock.

I use TCP and IP address to connect SQL Server using ADO like Azea mentioned.