Pourquoi la requête suivante déclenche-t-elle l'erreur ci-dessous pour une ligne avec une valeur NULL
pour canon lorsque je filtre explicitement ces lignes dans la clause Where
?Filtrage DBNull avec LINQ
Dim query = From row As dbDataSet.conformalRow In dbDataSet.Tables("conformal") _
Where Not IsDBNull(row.Cal) AndAlso tiCal_drop.Text = row.Cal _
AndAlso Not IsDBNull(row.Tran) AndAlso tiTrans_drop.Text = row.Tran _
AndAlso Not IsDBNull(row.barrel) _
Select row.barrel
If query.Count() > 0 Then tiBarrel_txt.Text = query(0)
Run-time exception thrown : System.Data.StrongTypingException - The value for column 'barrel' in table 'conformal' is DBNull.
Comment ma requête doit/condition être réécrite pour travailler comme je voulais?
Les méthodes Is [Field] Null() ont fonctionné parfaitement! Merci! – Steven