W
Wayne Wengert
I am using a datareader (dr1) to read through rows returned from a query. I
am getting the error: "No data exists for the row/column." at the "If
IsDbNull..." in the code below. The field "Photo1" does exist and in some
rows it is null, in others it may be an empty string and in others it may
have a file name. I don't understand exactly what the system is complaining
about here?
Wayne
=========== code ============
If IsDBNull(dr1.Item("Photo2")) Then
txtPhoto2.Text = ""
Else
txtPhoto2.Text = dr1.Item("Photo2")
End If
am getting the error: "No data exists for the row/column." at the "If
IsDbNull..." in the code below. The field "Photo1" does exist and in some
rows it is null, in others it may be an empty string and in others it may
have a file name. I don't understand exactly what the system is complaining
about here?
Wayne
=========== code ============
If IsDBNull(dr1.Item("Photo2")) Then
txtPhoto2.Text = ""
Else
txtPhoto2.Text = dr1.Item("Photo2")
End If