J
James
....
Dim rdr As OleDbDataReader = cmd.ExecuteReader
If rdr.GetString(1).ToString.Length > 0 Then
Console.WriteLine(rdr.GetString(1).ToString)
End If
The field is in an MS Access table that rdr is reading and
is a text field. I am getting an invalid cast error when
the field is null/empty.
I have tried If Not IsDBNull(rdr.GetString(1).ToString)...
still same problem. How can I trap if the field is null?
Thanks
Dim rdr As OleDbDataReader = cmd.ExecuteReader
If rdr.GetString(1).ToString.Length > 0 Then
Console.WriteLine(rdr.GetString(1).ToString)
End If
The field is in an MS Access table that rdr is reading and
is a text field. I am getting an invalid cast error when
the field is null/empty.
I have tried If Not IsDBNull(rdr.GetString(1).ToString)...
still same problem. How can I trap if the field is null?
Thanks