hi my name is vishal.
I was wondering what is equivalent of winsock properties of UBound of vb6 in c# windows forms with sql server2008?
I know this is naive question but with this answer i can solve my other problems with winsock in c# windows forms.
Given below is code in vb6 of using UBound property of winsock into table named:reprocess in Ms access.
Private Sub Form_Load()
On Error GoTo errh
Me.Icon = MDIForm1.Icon
Dim vSQLStr As String
Dim oRS As New ADODB.Recordset
Dim i As Long
Dim dBOOL As Boolean
Dim dMstr As String
Dim dPID As String
vSQLStr = "select ManufacturerName,DCS_ip_address from reprocess"
oRS.Open vSQLStr, adoDatabase, adOpenForwardOnly, adLockReadOnly
lstIP.Clear
dBOOL = False
Do While Not oRS.EOF
If (oRS.Fields("DCS_ip_address").Value <> "") Then
For i = 0 To MDIForm1.sckClient.UBound
If (oRS.Fields("DCS_ip_address").Value = MDIForm1.sckClient(i).RemoteHostIP) Then
lstIP.AddItem oRS.Fields("ManufacturerName").Value & " - " & oRS.Fields("DCS_ip_address").Value
dBOOL = True
Exit For
End If
Next i
End If
oRS.MoveNext
Loop
oRS.Close
Exit Sub
errh:
MsgBox Err.Description, vbCritical
End Sub
where
lstIP is name of my listbox in vb6 adodb with Ms access.
where
sckClient is name of my winsock control in vb6 adodb with Ms access.
I just want to know if there is any property equivalent of
UBound of winsock control of vb6 adodb with Ms access in winsock control of c# windows forms?
Can anyone help me please?Any help or guidance in solving of this problem would be greatly appreciated.