Solved

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

Posted on 2006-07-07
5
400 Views
Last Modified: 2013-11-13

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
0
Comment
Question by:Mohan_Raju
5 Comments
 
LVL 28

Accepted Solution

by:
AzraSound earned 250 total points
ID: 17058523
Use ADO:
http://www.carlprothman.net/Default.aspx?tabid=87#OLEDBProviderForSQLServer

Look under the section "To connect to SQL Server running on a remote computer (via an IP address)"
0
 
LVL 5

Expert Comment

by:lunchbyte
ID: 17058724
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.

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
If you haven’t already, I encourage you to read the first article (http://www.experts-exchange.com/articles/18680/An-Introduction-to-R-Programming-and-R-Studio.html) in my series to gain a basic foundation of R and R Studio.  You will also find the …
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

911 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now