John Baird
Coatesville, Pennsylvania, United States
General information
Category:
Coding, syntax and commands
Environment versions
Network:
Windows 2003 Server
>Hi everybody,
>
>Is there a simple way to check if the dataset is empty? I have a button to copy ds to Excel. However, I want to show some message if ds doesn't have records. Should I get the DataTable first and check RowCount?
>
>Thanks in advance.
if( ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
{
do something here;
}
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only