DataSet.Tables["yourTable"].Rows.Count

解决方案 »

  1.   

    DataSet.Tables["yourTable"].Rows.Count
      

  2.   

    呵呵!!!抢!
    DataSet.Tables["yourTable"].Rows.Count
      

  3.   

    如果用的是DataGrid,就要用for循环或SQL语句来计算记录数
      

  4.   

    Dim cmd As New SqlClient.SqlCommand()
            Dim rdr As New SqlClient.SqlDataAdapter()
            rdr.TableMappings.Add("table", "tmpgraphic")
            Dim ds As DataSet        cmd.Connection = cnn
            cmd.CommandText = "select sgrastyno,sgratype from stylegraphic where sgrastyno='test'"
            Try
                cnn.Open()
                rdr.SelectCommand = cmd
                ds = New DataSet("Graphic")            rdr.Fill(ds)
                dg.DataSource = ds
                dg.DataBind()            If ds.Tables("tmpgraphic").Rows.Count = 1 Then   为什么在这里出问题?
                    Beep()
                End If
      

  5.   

    where are you use this contorl?