I have done this multiple times with SQL and Oracle, but cannot get it to work with an Access DB.
This is what I have for code:
When I run it, it complains that Object reference not set to an instance of an object on line:
If Row.Item("Value") Is DBNull.Value Then
Any ideas why this does not work with Access DB?
Thanks in advance,
Kai-What?
This is what I have for code:
Code:
Dim cmdSelect = New OleDbCommand("Select Limit, Value From PartSpecs Where [PART No_:] = '" & strPID & "'", conMetrics)
Dim myDA As OleDbDataAdapter = New OleDbDataAdapter(cmdSelect)
Dim myDataSet = New DataSet
myDA.Fill(myDataSet, "PartSpecs")
Dim Row As DataRow
If myDataSet.Tables("PartSpecs").Rows.Count > 0 Then
Row = myDataSet.Tables("PartSpecs").Rows(0)
End If
If Row.Item("Value") Is DBNull.Value Then
LengthUpper.Text = String.Empty
Else
LengthUpper.Text = Row.Item("Value")
End If
When I run it, it complains that Object reference not set to an instance of an object on line:
If Row.Item("Value") Is DBNull.Value Then
Any ideas why this does not work with Access DB?
Thanks in advance,
Kai-What?