我得到一个"未处理的类型' System.Data.OleDB.OleDbException"发生在system.data.dll"错误
Dim MDBConnString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Folder\F1\Loader.mdb"
Dim con As OleDbConnection = New OleDbConnection(MDBConnString)
Dim cmd As New OledbCommand
con.Open() 'on this line
答案 0 :(得分:0)
将数据库文件保存在Access2003中并使用此代码
<connectionStrings>
<add name="Conn" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\YourDatabaseName.mdb;"/>
</connectionStrings>