Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
My application is developed in vb.net.
How can i display a message if my dataset retries no record?
please help
i tried
if (dataset.table.count >0)
{
}
else
{
message
}
end if

but it doesn't showing message if table has no records.

so please share your valuable thoughts
Posted
Updated 22-May-13 3:54am
v2

1 solution

VB
If ds.Tables(0).Rows.Count > 0 Then
'Do what you want to do
else
Messagebox.Show("No Records Found")
End If
 
Share this answer
 
Comments
Am Gayathri 22-May-13 10:11am    
Thanks a lot..it is so simple
Thank u...
Basmeh Awad 22-May-13 10:12am    
haha..welcome

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900