[求助]vb.net与access的连接问题
谁能帮我看一下我的程序那里出错了?谢谢!
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim olecn As New OleDb.OleDbConnection
Dim olecomm As New OleDb.OleDbCommand
Dim oleda As New OleDb.OleDbDataAdapter
Dim oleds As New DataSet
olecn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\照片管理系统"
olecomm.CommandText = "select * from 照片"
olecomm.Connection = olecn
oleda.SelectCommand = olecomm
olecn.Open()
oleda.Fill(oleds)
olecn.Close()
DataGrid1.DataSource = oleds.Tables(0)
End Sub
程序告诉我 olecn.open()错了
但我不知哪错了 谁能告诉我呀 谢谢!