dbnull

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
segue [ Di, 29 Januar 2008 00:51 ] [ ID #1918808 ]

RE: dbnull

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
>
>
mily242 [ Di, 29 Januar 2008 01:10 ] [ ID #1918812 ]
Microsoft » microsoft.public.dotnet.framework.aspnet » dbnull

Vorheriges Thema: What to use
Nächstes Thema: flash flv player with an AJAX playlist