vb.net获得dataset的内容

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

        Private ds As DataSet  New DataSet 
        Dim dt As DataTable = Me.ds.Tables("tableSample")
        Dim row As DataRow = dt.NewRow

        Dim str As String = String.Empty
        For Each row In dt.Rows

            For i As Integer = 0 To row.ItemArray.Length - 1
                str = str & (row.ItemArray(i).ToString)
                str = str & ","
            Next
            str = str.Remove(Len(str) - 1, 1)
            str = str & vbCrLf
        Next

        MessageBox.Show(str)
    End Sub 

没有更多推荐了,返回首页

私密
私密原因:
请选择设置私密原因
  • 广告
  • 抄袭
  • 版权
  • 政治
  • 色情
  • 无意义
  • 其他
其他原因:
120
出错啦
系统繁忙,请稍后再试