用VB.NET连接ACCESS的时候消息框提示 “找不到可安装的ISAM”
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.ClickDim conn As OleDb.OleDbConnection = New OleDbConnection 第一句
conn.ConnectionString="provider=microsoft.jet.OLEDB.4.0; 第二句
datesource="& Application.StartupPath &"\jxgl.mdb" 第三句
Try
conn.Open()
MessageBox.Show("数据库连接成功!", "数据库连接")
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Close()
End Try
End Sub
注:第二句和第三句在源代码中本为一行代码。因在贴中不好编辑,所以分开了。,
[此贴子已经被作者于2007-4-4 21:07:17编辑过]