How to check null values in dataset

Posted by Murugavelmsc under Interview Questions on 2/28/2013 | Points: 10 | Views : 912 | Status : [Member] | Replies : 2
Hi Experts,

How to check null values in dataset

Thanks,
Murugavel S

Regards,
Murugavel S
murugavel.sadagopan@gmail.com
http://murugavelmsc.blogspot.in/



Responses

Posted by: Jayakumars on: 2/28/2013 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi

try this code

if (dt.Rows.Count > 0)
{
}

Mark as Answer if its helpful to you

Murugavelmsc, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Raj.Trivedi on: 2/28/2013 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hello Murugavelmsc,

This code will do the work,

dataset dscheck = new dataset();
if(ds.tables[0].rows.count >0)
{
//your logic
}
else
{
label1.text = "No records";
}


Regard's
Raj.Trivedi
"Sharing is Caring"
Please mark as answer if your Query is resolved

Murugavelmsc, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response