I'm trying to implement my first Winsock object. I'm working in Access 2003, on either a WinXP or Vista machine. The server I am trying to connect to is, for testing at the moment, on the same machine that I am writing and running the client on.
I have downloaded a winsock component from Ostrosoft. If I could find it on my machine I'd be just as happy to use the Microsoft component, but I don't think it really matters. I trust the Ostrosoft component works and it has some benefits over the MS control.
Anyway, my connection is being denied and I don't have a clue why. What can cause that. I have, in different tests, identified the IP of the server as 127.0.0.1 and as the true IP of my system. Never having worked with Winsock before, I don't know how to troubleshoot this.
Here's the code.
strState = '9' and
strStatus = Error 10061: Connection refused.
after the connection attempt.
Any ideas?
Thanks,
Jim
I have downloaded a winsock component from Ostrosoft. If I could find it on my machine I'd be just as happy to use the Microsoft component, but I don't think it really matters. I trust the Ostrosoft component works and it has some benefits over the MS control.
Anyway, my connection is being denied and I don't have a clue why. What can cause that. I have, in different tests, identified the IP of the server as 127.0.0.1 and as the true IP of my system. Never having worked with Winsock before, I don't know how to troubleshoot this.
Here's the code.
Code:
strPort = "31405" strHostAddress = "127.0.0.1" 'strHostAddress = "192.168.0.1" Me!OstroSoftWinSockObject.Protocol = 0 'TCP Me!OstroSoftWinSockObject.RemoteHost = strHostAddress Me!OstroSoftWinSockObject.RemotePort = strPort 'TCP Me!OstroSoftWinSockObject.Connect ' strHostAddress, strPort ' "127.0.0.1", "31405" strState = Me!OstroSoftWinSockObject.state strStatus = Me!OstroSoftWinSockObject.Status
strStatus = Error 10061: Connection refused.
after the connection attempt.
Any ideas?
Thanks,
Jim