我有一个函数,用于搜索关键字并返回数据表。我想检查其中是否有行,因为有时没有找到查询结果。
感谢您的选择。
'which one shoud I use ?
If dtDataTable Is Nothing Then
'some code
lbl_count.Text = "Found 0 result"
End If
If dtDataTable.Rows.Count > 0 Then
'some code
lbl_count.Text = "Found " & dtDataTable.Rows.Count.ToString & " results"
End If
感谢您的选择。