Your comparison is between an integer and a string; so this should always be false
"0" != 0
If Not studentMark.Tables(0).Rows.Count.ToString() = 0 Then
Normally I check a DataTable like this to make sure it is not null and has content
Please note: This is C# and based on a DataTable- you will need to adjust
DataTable dt = null;
if ((dt != null) && (dt.Rows.Count > 0)) {
}