Bonjour,

j'aimerais savoir comment faire pour quand DataSet retourne Nothing.
J'ai mis un Try...catch et il me gère une exception quand il trouve Nothing.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
             Dim loDsResultat As New DataSet
            Dim loDataAdapter As New SqlDataAdapter(bddCommand)
            Dim loBuilder As New SqlCommandBuilder(loDataAdapter)
 
            loDataAdapter.Fill(loDsResultat, "Table")
 
            Return loDsResultat.Tables.Item("Table")
Ca me retourne une erreur quand il trouve rien (Nothing).

Merci pour vos réponses!