dbnull

dbnull

am 29.01.2008 00:51:01 von segue

How would I run an if statement for dbnull?

Much thanks.

Dim reader As OdbcDataReader = select_command.ExecuteReader()
Do While (reader.Read())

If reader.Item("somedbfield") <> DBNull.Value Then

RE: dbnull

am 29.01.2008 01:10:00 von mily242

Hi there,

Yep, as well as:
If Not TypeOf reader("somedbfield") Is DbNull then
If Not reader.IsDbNull(reader.GetOrdinal("somedbfield")) then
--
Milosz


"segue" wrote:

>
> How would I run an if statement for dbnull?
>
> Much thanks.
>
> Dim reader As OdbcDataReader = select_command.ExecuteReader()
> Do While (reader.Read())
>
> If reader.Item("somedbfield") <> DBNull.Value Then
>
>