[RESOLVED] [2005] rw.Item("var") DBNull.Value
How do I check to see if rw.Item("Type") is Null and if it is skip it?
Code:
Public Sub GetCodeType(ByVal Code As String)
Dim rw As DataRow
Me.DsCodeTypes1.Clear()
Me.sdaCodeTypes.Fill(DsCodeTypes1)
Dim TypeNumber As Integer = CInt(Mid(Code, 8, 5))
For Each rw In Me.DsCodeTypes1.Tables("BarCode").Rows
If Trim(rw.Item("BarCode_Unique")) = TypeNumber Then
CodeType = rw.Item("Type")
Re: [2005] rw.Item("var") DBNull.Value
Code:
IF Not rw.IsDBNull("Type") Then
Do what ever here
End If
Re: [2005] rw.Item("var") DBNull.Value
ISDBNull is not a member of System.Data.DataRow
Re: [2005] rw.Item("var") DBNull.Value
Code:
If Not IsDBNull(rw.Item("type")) Then
Re: [2005] rw.Item("var") DBNull.Value
Yeah thanks fellas. I can't wait till I'm smart enough to help others. ha