Hello,
I am trying to create an IF statement that will recognize whether or
not a field in the database table is set to some value or if is NULL.
Dim myCommand As New System.Data.Sql Client.SqlComma nd("SELECT
* FROM Keyword", conn)
Dim myReader As System.Data.Sql Client.SqlDataR eader =
myCommand.Execu teReader(Comman dBehavior.Close Connection)
While myReader.Read()
If Not myReader("coil_ search") Then
...
...
End If
End While
myReader.Close( )
The "If Not myReader("coil_ search") Then" statement does not seem to
recognize a NULL field.
How can I write a statement that will recognize a NULL field?
Thanks,
Etay
I am trying to create an IF statement that will recognize whether or
not a field in the database table is set to some value or if is NULL.
Dim myCommand As New System.Data.Sql Client.SqlComma nd("SELECT
* FROM Keyword", conn)
Dim myReader As System.Data.Sql Client.SqlDataR eader =
myCommand.Execu teReader(Comman dBehavior.Close Connection)
While myReader.Read()
If Not myReader("coil_ search") Then
...
...
End If
End While
myReader.Close( )
The "If Not myReader("coil_ search") Then" statement does not seem to
recognize a NULL field.
How can I write a statement that will recognize a NULL field?
Thanks,
Etay
Comment