Me.Bindingsource1.datasource=ds.Tables("产品")
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'
Try
Dim connectStringBuilder As New OleDbConnectionStringBuilder()
connectStringBuilder.DataSource = "D:\Northwind\Northwind.mdb "
connectStringBuilder.Provider = "microsoft.jet.oledb.4.0 "
Using cn As New OleDbConnection(connectStringBuilder.ConnectionString)
cn.Open()
Dim ds As New DataSet()
Dim cmdLiming As New OleDbCommand( "SELECT * FROM 产品 ", cn)
Using drLiming As OleDbDataReader = cmdLiming.ExecuteReader()
ds.Load(drLiming, LoadOption.OverwriteChanges, New String() { "产品 "})
Me.datasource = ds.Tables( "产品 ")
End Using
End Using
Catch ex As Exception
End Try
End Sub
-----------------------
Me.Bindingsource1.datasource=ds.Tables( "产品 ")
在这一行提示:错误1“Bindingsource1”不是“Northwind.Form1”的成员。D:\Northwind\Northwind\Form1.vb2721Northwind
这个怎么解决?
[解决办法]
Bindingsource1是窗体中的一个控件么?
[解决办法]
Bindingsource1有这控件马
*****************************************************************************
欢迎使用CSDN论坛专用阅读器 : CSDN Reader(附全部源代码)
最新版本:20070212
http://www.cnblogs.com/feiyun0112/archive/2006/09/20/509783.html