I’m calling some data from my Oracle table and I have a field which is called ‘image1’ which is a BLOB field.
Sometimes an image is input into the field and others it’s not. I need a way to read the BLOB field to see if its a blank and then show/hide my label based on its contents.
Here’s my source code
query = OracleConn.CreateCommand()
query.CommandText = "select * from articles"
DataTable = New DataTable()
OracleDataAdapter = New OracleDataAdapter(query)
OracleDataAdapter.Fill(DataTable)
GridView1.DataSource = DataTable.DefaultView
GridView1.DataBind()
If DataTable.Rows(0).Item("image1") = "" Or DataTable.Rows(0).Item("image1") Is Nothing Then
lbl1.Visible = False
End If
This doesn’t seem to do what it’s suppose to do.
Any ideas how i can accomplish my goal?
Thanks
You should test to see if image1 is DBNull: