| Bug #28252 | make select on table but some values are bytes[] instead inte | ||
|---|---|---|---|
| Submitted: | 4 May 2007 17:24 | Modified: | 21 May 2007 14:54 |
| Reporter: | Sebastien Bonnet | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | Connector / NET | Severity: | S2 (Serious) |
| Version: | 5.1.0 and 5.0.6 | OS: | Windows (xp sp2, mysql 5.0.37 community) |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | system.bytes integer select .NET 5.1.0 5.0.6 | ||
[4 May 2007 17:24]
Sebastien Bonnet
[4 May 2007 17:53]
Sebastien Bonnet
i send mthode select to mysql data
Public Sub MySQL_select(ByVal myQuery As String, ByVal ParamArray myParameters() As String)
_datatable = New System.Data.DataTable
_MySQL_command = New Global.MySql.Data.MySqlClient.MySqlCommand(myQuery, _mySQL_Connection)
_MySQL_adapter.SelectCommand = _MySQL_command
If myParameters.Length > 0 Then
For i As Integer = 0 To myParameters.Length - 1 Step 2
If myParameters(i + 1).ToString = "Null" Then
_MySQL_adapter.SelectCommand.Parameters.AddWithValue(myParameters(i), DBNull.Value)
Else
_MySQL_adapter.SelectCommand.Parameters.AddWithValue(myParameters(i), myParameters(i + 1))
End If
Next
End If
Try
_MySQL_adapter.Fill(_datatable)
Catch e As Global.MySql.Data.MySqlClient.MySqlException
Nexus.erreurs.message_erreur_mysql(e.Source, e.Number, e.Message, myQuery, myParameters)
_datatable = Nothing
End Try
End Sub
[4 May 2007 18:06]
Sebastien Bonnet
i think i have the solution !!!!! Public select_phaseB7_drugs As String = "SELECT IFNULL(drug_dunit,'') as drug_dunit," & _ "IFNULL(drug_numinterunit,'') as drug_numinterunit," & _ "IFNULL(drug_reactionoccur,'') as drug_reactionoccur " & _ "FROM drugs WHERE drug_fileid=?drug_fileid;" this is my initial request i inspect table and i see that these fields are int(11), not varchar i modify : Public select_phaseB7_drugs2 As String = "SELECT IFNULL(drug_dunit,0) as drug_dunit," & _ "IFNULL(drug_numinterunit,0) as drug_numinterunit," & _ "IFNULL(drug_reactionoccur,0) as drug_reactionoccur " & _ "FROM drugs WHERE drug_fileid=?drug_fileid;" AND WORKING !!!!!!! but i don t understand why with phpmyadmin and SQLyog, the first request work too
[21 May 2007 14:54]
Reggie Burnett
This is a duplicate of other bugs and has already been fixed in 5.0.7 and 5.1.1
