Solved

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

Posted on 2006-07-07
5
402 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This video teaches viewers about errors in exception handling.
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.

808 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