本文介绍了DataGrid - 数据集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 受保护的子Page_Load(ByVal sender As Object,ByVal e As System.EventArgs) [连接对象创建] Dim sSQL As String =" SELECT * FROM tPlayers" Dim myAdapter As OleDbDataAdapter = New OleDbDataAdapter(sSQL,myConnection) Dim MyDataSet作为新数据集 myAdapter.Fill(MyDataSet) GridView1.DataSource = MyDataSet GridView1。 DataBind() myConnection.Close() End Sub 我知道连接对象很好,因为我在其他地方使用它,我从上面的事件中编辑了 。 我有需要的命名空间,所以它必须是语法,但我不能对于 我的生活看看问题是什么。 其他人可以吗? Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) [connection object creation] Dim sSQL As String = "SELECT * FROM tPlayers" Dim myAdapter As OleDbDataAdapter = NewOleDbDataAdapter(sSQL,myConnection)Dim MyDataSet As New DataSet myAdapter.Fill(MyDataSet)GridView1.DataSource = MyDataSet GridView1.DataBind() myConnection.Close() End SubI know the connection object is good because I use it else where, I haveedited out from the event above. I have the require Namespaces , so it must be syntax, but I cannot for thelife of me see what the problem is. Can anyone else?推荐答案 这篇关于DataGrid - 数据集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-26 23:04