Dataadapter dgv

Fermé
pfec# Messages postés 3 Date d'inscription lundi 1 avril 2013 Statut Membre Dernière intervention 7 mai 2013 - 7 mai 2013 à 17:02
Bonjour,

le probleme c lors de resaisir un autre numero de seri un message d'erreur s'affiche "cannot clean this list"

code :
Try
dgv.Rows.Clear()
a = txtnums.Text
b = clean_string(a)

strSQL = "SELECT * FROM table_detail td where td.Table_summary_ID_summary in ( select ID_summary from table_summary ts where Table_mechanical_assembly_ID_mechanical_assembly in (select ID_mechanical_assembly from Table_mechanical_assembly tm where tm.Serial_no ='" + b + "'))"

MsgBox(strSQL)
cmd = New MySqlCommand(strSQL, cn)
' Chargement de la liste des produits dans oDataSet
dataad = New MySqlDataAdapter(cmd)
sBuilder = New MySqlCommandBuilder(dataad)
ds = New DataSet()
dataad.Fill(ds, "table_detail")
dgv.DataSource = ds.Tables("table_detail")
ds.Clear()
dr.Close()
Catch ex As Exception

MsgBox(ex.Message, MsgBoxStyle.Information)

End Try