1
如何檢查數據集是否爲空? 我寫了下面的代碼:檢查vb.net數據集是否爲空
Dim da As New SqlDataAdapter("query",connection string)
da.Fill(ds)
If (Not (ds.Tables.Count > 0)) Then
Response.Redirect("norecords.aspx?str1=" + str1)
end if
在if條件,我無法訪問ds.Tables[0].rows.count
。我應該怎麼做?