|
-
Feb 1st, 2005, 02:51 AM
#1
Thread Starter
New Member
winsock
hi,
i have assigned the winsock control,
the client side query disply cannot send the error is
" wrong protocol or connection state for the requested transaction or request"
Private Sub Command1_Click()
Winsock1.RemoteHost = "localhost"
Winsock1.RemotePort = 8085
Winsock1.Connect
Print "connected to server"
End Sub
Private Sub Command2_Click()
sql = Text1.Text
Winsock1.SendData sql
Print "sql has been sent to server"
End Sub
-
Feb 1st, 2005, 05:39 AM
#2
Re: winsock
 Originally Posted by visva
hi,
i have assigned the winsock control,
the client side query disply cannot send the error is
" wrong protocol or connection state for the requested transaction or request"
Private Sub Command1_Click()
Winsock1.RemoteHost = "localhost"
Winsock1.RemotePort = 8085
Winsock1.Connect
Print "connected to server"
End Sub
Private Sub Command2_Click()
sql = Text1.Text
Winsock1.SendData sql
Print "sql has been sent to server"
End Sub
Hey there welcome to the forums,
This is our codebank and is used for posting code snippets etc,
You may get a faster reply if you post in our general forum or in the case of your question in our Distributed Computing (multi-tier development) forum.
Ok to your question,
That error happens because you are not conneted
Print "connected to server" at this point your are not connected to the server but connecting.
Are you running a server application as well?
-
Mar 2nd, 2005, 08:55 PM
#3
New Member
Re: winsock
Try to close your winsock before Connect.
If Winsock1.State <> sckClosed Then Winsock1.Close
Winsock1.RemoteHost = "lolcalhost"
Winsock1.RemotePort = 8085
Winsock1.Connect
Print "connected to server"
 Originally Posted by visva
hi,
i have assigned the winsock control,
the client side query disply cannot send the error is
" wrong protocol or connection state for the requested transaction or request"
Private Sub Command1_Click()
Winsock1.RemoteHost = "localhost"
Winsock1.RemotePort = 8085
Winsock1.Connect
Print "connected to server"
End Sub
Private Sub Command2_Click()
sql = Text1.Text
Winsock1.SendData sql
Print "sql has been sent to server"
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|