Extract data table for check data

Hi @Stef_99

Try this:

If
 dt.Rows.Count <= 1 AndAlso dt.Rows(0).ItemArray.All(Function(x) String.IsNullOrEmpty(x.ToString.Trim)) 
Then
    Datatable is empty
    Perform actions here
Else
    Datatable is not empty
    Perform other actions here
End If

Regards

1 Like