im getting a image from my database to a data set. before i convert it to a proper picture i need to check whether ds.Tables("userDetails").Rows(0).Item("photo") is EMPTY or NOT. How should i write the if condition?


<code>If ds.Tables("userDetails").Rows(0).Item("photo")<> ??? Then


Dim pictureData As Byte() = DirectCast(ds.Tables("userDetails").Rows(0).Item("photo"), Byte())

Dim picture As Image = Nothing

Using stream As New IO.MemoryStream(pictureData)
picture = Image.FromStream(stream)
End Using

PictureBox2.Image = picture
Else
MsgBox("No picture")
End If</code>

I tried as follows.

<code>If ds.Tables("userDetails").Rows(0).Item("photo")<> DBNullThen</code>


<code>If ds.Tables("userDetails").Rows(0).Item("photo")<> System.DBNullThen</code>

But didnt work. PLZ help! thanks