PC Review


Reply
 
 
segue
Guest
Posts: n/a
 
      28th Jan 2008

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


 
Reply With Quote
 
 
 
 
Milosz Skalecki [MCAD]
Guest
Posts: n/a
 
      29th Jan 2008
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
>
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nothing vs dbnull.value John Microsoft VB .NET 2 19th Mar 2008 11:27 AM
DBNull Greg Microsoft VB .NET 4 29th Feb 2008 06:04 AM
DBNull? Brent Microsoft Dot NET 2 17th Oct 2006 09:03 PM
DBNULL =?Utf-8?B?REs=?= Microsoft ADO .NET 2 1st Apr 2006 01:06 PM
DBNull.Value Mark Microsoft C# .NET 5 9th Jan 2004 08:21 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:04 AM.