I am retrieving a value from an access table, and I get an error each time the value is null, how can I work around this so it continues to execute the code and populates the datagrid and leaves those null values blank in the datagrid?
Thanks for any insight!
Kai-What?
Code:
Dim cmdSelectSWBLower = New OleDbCommand("Select * From PartSpecs Where [PART No_:] = '" & strPID & "' AND Limit = 'SWBLower'", conMetrics)
Dim myDA5 As OleDbDataAdapter = New OleDbDataAdapter(cmdSelectSWBLower)
Dim myDataSet5 = New DataSet
myDA5.Fill(myDataSet5, "PartSpecs")
Dim Row5 As DataRow
If myDataSet5.Tables("PartSpecs").Rows.Count > 0 Then
Row5 = myDataSet5.Tables("PartSpecs").Rows(0)
End If
If Row5.Item("Value") Is DBNull.Value Then
SWBLower.Text = String.Empty
Else
SWBLower.Text = Row5.Item("Value")
End If
Thanks for any insight!
Kai-What?