Solved

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

Posted on 2006-07-07
5
399 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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
This article will show, step by step, how to integrate R code into a R Sweave document
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

772 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

16 Experts available now in Live!

Get 1:1 Help Now