Checking for DBNull

Reminder to self: when pulling fields from db that aren't required, check for DBNull!

if(r["ImageKey"]!=DBNull.Value)
   this.ImageKey=Convert.ToInt32(r["ImageKey"]);

Print | posted on Sunday, August 22, 2004 10:38 PM

Feedback

No comments posted yet.
Title  
Name
Email (never displayed)
Url
Comments   
Please add 3 and 2 and type the answer here: