Binding navigator

Fermé
sihem hcine Messages postés 113 Date d'inscription mercredi 5 mars 2014 Statut Membre Dernière intervention 7 février 2016 - 26 avril 2015 à 00:43
Bonsoir ,
j'utilise binding navigator pourajouter new item
<vb>

cnx.Open()
Try
cmd.CommandText = "Select action.* from action"
Catch ex As Exception
MsgBox(ex.Message)

End Try

da.SelectCommand = cmd
Try
cmd.Connection = cnx
Catch ex As Exception
MsgBox(ex.Message)
End Try
cmd.Connection = cnx
da.Fill(dts, "action")


DataGridView1.DataSource.ds.Tables("table")
</vb>


lors de l'exécution , il m'affiche une erreur : la referencen'est pas définie à une instance d'objet
Mercii de m'aider .