Hi all,
Could anyone help me with this? Urgent please.
I have a code in vb utilizing winsock control but it can send to one workstation only, if msgbox is called it now can send data to all workstations.
the code for this is given below:
******************
rsQuestions.Open "SELECT * FROM tblquestions WHERE SetID = 1", db, adoopendynamic, adLockOptimistic
If (Socket1.State = sckConnected) Then
Socket1.SendData "ques:" & rsQuestions![Question]
Socket1.SendData "choa:" & rsQuestions![ChoiceA]
Socket1.SendData "chob:" & rsQuestions![ChoiceB]
Socket1.SendData "choc:" & rsQuestions![ChoiceC]
Socket1.SendData "chod:" & rsQuestions![ChoiceD]
End If
If (Socket2.State = sckConnected) Then
Socket2.SendData "ques:" & rsQuestions![Question]
Socket2.SendData "choa:" & rsQuestions![ChoiceA]
Socket2.SendData "chob:" & rsQuestions![ChoiceB]
Socket2.SendData "choc:" & rsQuestions![ChoiceC]
Socket2.SendData "chod:" & rsQuestions![ChoiceD]
End If
If (Socket3.State = sckConnected) Then
Socket3.SendData "ques:" & rsQuestions![Question]
Socket3.SendData "choa:" & rsQuestions![ChoiceA]
Socket3.SendData "chob:" & rsQuestions![ChoiceB]
Socket3.SendData "choc:" & rsQuestions![ChoiceC]
Socket3.SendData "chod:" & rsQuestions![ChoiceD]
End If
lblQuestion = rsQuestions![Question]
lblChoiceA = rsQuestions![ChoiceA]
lblChoiceB = rsQuestions![ChoiceB]
lblChoiceC = rsQuestions![ChoiceC]
lblChoiceD = rsQuestions![ChoiceD]
***************
it grabs data from a database and sends that data to workstations.
Thanks in advance.
Could anyone help me with this? Urgent please.
I have a code in vb utilizing winsock control but it can send to one workstation only, if msgbox is called it now can send data to all workstations.
the code for this is given below:
******************
rsQuestions.Open "SELECT * FROM tblquestions WHERE SetID = 1", db, adoopendynamic, adLockOptimistic
If (Socket1.State = sckConnected) Then
Socket1.SendData "ques:" & rsQuestions![Question]
Socket1.SendData "choa:" & rsQuestions![ChoiceA]
Socket1.SendData "chob:" & rsQuestions![ChoiceB]
Socket1.SendData "choc:" & rsQuestions![ChoiceC]
Socket1.SendData "chod:" & rsQuestions![ChoiceD]
End If
If (Socket2.State = sckConnected) Then
Socket2.SendData "ques:" & rsQuestions![Question]
Socket2.SendData "choa:" & rsQuestions![ChoiceA]
Socket2.SendData "chob:" & rsQuestions![ChoiceB]
Socket2.SendData "choc:" & rsQuestions![ChoiceC]
Socket2.SendData "chod:" & rsQuestions![ChoiceD]
End If
If (Socket3.State = sckConnected) Then
Socket3.SendData "ques:" & rsQuestions![Question]
Socket3.SendData "choa:" & rsQuestions![ChoiceA]
Socket3.SendData "chob:" & rsQuestions![ChoiceB]
Socket3.SendData "choc:" & rsQuestions![ChoiceC]
Socket3.SendData "chod:" & rsQuestions![ChoiceD]
End If
lblQuestion = rsQuestions![Question]
lblChoiceA = rsQuestions![ChoiceA]
lblChoiceB = rsQuestions![ChoiceB]
lblChoiceC = rsQuestions![ChoiceC]
lblChoiceD = rsQuestions![ChoiceD]
***************
it grabs data from a database and sends that data to workstations.
Thanks in advance.