用vb.net和SQL ServerVB.Net数据集检查空
所以我的数据集是这样的:
Dim ds3 As New FOCUSDataSetTableAdapters.GajiTableAdapter
,我想在数据集中的项目到一个数组。但该数据集是空的现在...所以我尽量..
Dim smp As New List(Of String)()
Try
For i = 0 To ds3.GetData.Count - 1
If (ds3.GetData.Rows(0).Item(3) Is Nothing) Then
smp.Add("0")
End If
Next
Catch ex As Exception
i = i - 1
End Try
所以基本上我想要的是...如果数据库是空/空然后添加“0”到数组。但每次我运行这个代码,它只会给我错误状态,现在有行在当前位置(0)...
好吧..现在得到它..非常感谢你 – 2013-05-09 13:45:21