Results 1 to 3 of 3

Thread: dbnull

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2005
    Posts
    159

    dbnull

    hw do I validate a dbnull value from sql server
    That i get using a datareader
    thx

  2. #2
    Banned
    Join Date
    Nov 2005
    Posts
    2,367

    Re: dbnull

    Something like this?
    Code:
    System.Data.SqlClient.SqlDataReader sqlRead;	//Reader
    		int32 intIndex;		//Row number
    			if (sqlRead.IsDBNull(intIndex))
    			{
    				//Null
    			}
    			else
    			{
    				//Not Null
    			}
    Edit: Same thing, just elaborated.
    Last edited by sevenhalo; Dec 23rd, 2005 at 10:25 AM.

  3. #3
    Fanatic Member
    Join Date
    Jan 2005
    Location
    Cebu
    Posts
    607

    Re: dbnull

    == DBNull.Value ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width