Thursday, January 6, 2011

How to insert blank value in database when field is integer type

Suppose if you want to Insert blank value in database when field is integer type

if (roll.Text == "")
{
roll.Text = "(NULL)";

}

insert into table values('"+roll.Text+"')

No comments :

Post a Comment