p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > Microsoft Office > Access and Access VBA > Access VBA
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.

Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 13th, 2009, 07:50 AM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to bind more than one client in one computer to winsock server

How to bind more than one client in one computer to winsock server
i have 1 application server in server computer
and 5 client application in one computer. ( install 5 client in one computer )
i use oswinsck winsock UDP protocol
if only 1 client connect to server, everything well done
but if more than one client connected to server , will be errror
"Method 'Bind' of object 'IMSWinsockControl' Failed


my question is how to solve this problem
application server and application client , i made with ms.access xp
-----------
server
-----------
Option Compare Database
Dim WithEvents WsServer As OSWINSCK.Winsock

Private Sub cmdSend_Click()
On Error GoTo salah
WsServer.SendData txtUserIdJats
Exit Sub
salah:
MsgRoes Err.Description, "Test Msg"
End Sub

Private Sub Form_Load()

Set WsServer = CreateObject("OSWINSCK.Winsock")
WsServer.Protocol = sckUDPProtocol
WsServer.RemoteHost = ipserver
WsServer.RemotePort = rport

End Sub

Private Sub WsServer_OnClose()
WsServer.CloseWinsock
End Sub
Private Sub WsServer_OnDataArrival(ByVal bytesTotal As Long)
On Error GoTo salah
Dim sBuffer As String
WsServer.GetData sBuffer
Me.List6.AddItem "Data : " & sBuffer & vbCrLf

Exit Sub
salah:
MsgRoes Err.Description, "Winsock Data Arrival"
End Sub
Private Sub WsServer_OnError(ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)
MsgBox Description, vbOKOnly, "Winsock Error: " & Number
CancelDisplay = True
End Sub

---------------------
Client
---------------------
Option Compare Database
Dim WithEvents wsClient As OSWINSCK.Winsock
Private Sub Command5_Click()
wsClient.SendData Me.Text6
End Sub

Private Sub Form_Close()
wsClient.CloseWinsock
End Sub

Private Sub Form_Load()
Set wsClient = CreateObject("OSWINSCK.Winsock")
wsClient.Protocol = sckUDPProtocol
wsClient.Bind 51010


End Sub

Private Sub wsClient_OnDataArrival(ByVal bytesTotal As Long)

Dim sBuffer As String
wsClient.GetData sBuffer
Me.List6.AddItem "Data : " & sBuffer & vbCrLf
End Sub

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
using cookie with client computer hertendreef ASP.NET 2.0 Professional 4 December 28th, 2008 03:45 PM
How to get Client Computer Name ramuis78 ASP.NET 2.0 Basics 2 March 12th, 2007 12:48 AM
how to get client computer name ramuis78 ASP.NET 1.0 and 1.1 Basics 1 March 11th, 2007 11:21 AM
how to instal font at client computer BurhanKhan Javascript 4 April 28th, 2004 06:48 AM
VBA winsock POP email client hooi Access VBA 0 December 23rd, 2003 04:03 AM



All times are GMT -4. The time now is 04:34 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc