When I execute this command :
Code: Select all
Public Sub GetPays(ByVal cbo As Janus.Windows.EditControls.UIComboBox, Optional ByVal cbo2 As Janus.Windows.EditControls.UIComboBox = Nothing, Optional ByVal cbo3 As Janus.Windows.EditControls.UIComboBox = Nothing)
Dim mySelectQuery As String = "SELECT `ID_Pays`,`Pays`, `Flag` FROM ztbl_country"
Dim myCommand As New CoreLab.MySql.MySqlCommand(mySelectQuery, MySQLConnexion)
cbo.Items.Clear()
If Not cbo2 Is Nothing Then cbo2.Items.Clear()
If Not cbo3 Is Nothing Then cbo3.Items.Clear()
Try
Dim myReader As CoreLab.MySql.MySqlDataReader = myCommand.ExecuteReader()
' Always call Read before accessing data.
While myReader.Read()
cbo.Items.Add(myReader.GetString(myReader.GetOrdinal("Pays")), myReader.GetString(myReader.GetOrdinal("ID_Pays")))
If Not cbo2 Is Nothing Then
cbo2.Items.Add(myReader.GetString(myReader.GetOrdinal("Pays")), myReader.GetString(myReader.GetOrdinal("ID_Pays")))
End If
If Not cbo3 Is Nothing Then
cbo3.Items.Add(myReader.GetString(myReader.GetOrdinal("Pays")), myReader.GetString(myReader.GetOrdinal("ID_Pays")))
End If
Dim myBlob As CoreLab.MySql.MySqlBlob = myReader.GetMySqlBlob(myReader.GetOrdinal("Flag"))
If Not myBlob.IsEmpty Then
cbo.Items(myReader.GetString(myReader.GetOrdinal("Pays"))).Image = New Bitmap(myBlob)
If Not cbo2 Is Nothing Then
cbo2.Items(myReader.GetString(myReader.GetOrdinal("Pays"))).Image = New Bitmap(myBlob)
End If
If Not cbo3 Is Nothing Then
cbo3.Items(myReader.GetString(myReader.GetOrdinal("Pays"))).Image = New Bitmap(myBlob)
End If
End If
End While
' always call Close when done reading.
myReader.Close()
cbo.SelectedItem = cbo.Items("Belgique")
If Not cbo2 Is Nothing Then
cbo2.SelectedItem = cbo.Items("Belgique")
End If
If Not cbo3 Is Nothing Then
cbo3.SelectedItem = cbo.Items("Belgique")
End If
Finally
myCommand.Dispose()
mySelectQuery = Nothing
End Try
Any idea to solve my problem ?Net packet out of order : received [0], expected[59]
If I ignore this error an try to recall this fuction this error not appear !
Note:
the number in expected[xxx] is not same each time
Thanks,
Didier Lombet
Hostonet
P.S. : I use the last release pro of MySQLDirect