I'm trying to open a 2003 Access Database using OLEDB.
I initially tried:
which as always worked for me before, but got the error:
So I found a system.mdw file on another PC that has Office installed and copied it to "C:\Databases\" and added the line:
This now produces the error:
I tried using:
I get the error:
so that's obviously not right.
I've opened the database with Office and the database opens fine with the password.
I have another application that opens the same files without any problem using the first ConnectionString. This application has the same references as the other project, it has the same Imports, uses the same Class to manage the database access.
I tried using the Provider "Microsoft.ACE.OLEDB.12.0" but that produces exactly the same error.
When I open the database using Office, I get the Security prompt "Enable contents...", I don't know whether this has any bearing on the matter, and if so how to open a database with this security setting.
I don't know where to go from here.
Configuration:
VS2012 Express
VB.NET
Windows 8
.NET Framework 4.5
I initially tried:
VB.NET:
con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" &
"Data Source=database.mdb;" &
"User ID=;" &
"Password=password;"
VB.NET:
Error Details:
Number: 5
Description: Cannot start your application. The workgroup information file is missing or opened exclusively by another user.
Source: Microsoft JET Database Engine
HelpContext: 0
HelpFile:
LastDllError: 183
VB.NET:
Dim con As OleDbConnection ' for the Access MDB Connection
con = New OleDbConnection
Try
con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" &
"Data Source=database.mdb;" &
"User ID=;" &
"Password=password;" &
"Jet OLEDB:"System database=C:\Databases\system.mdw;"
VB.NET:
Error Details:
Number: 5
Description: Not a valid account name or password.
Source: Microsoft JET Database Engine
HelpContext: 0
HelpFile:
LastDllError: 183
VB.NET:
"Jet OLEDB:Database Password=password;"
VB.NET:
Could not find installable ISAM
I've opened the database with Office and the database opens fine with the password.
I have another application that opens the same files without any problem using the first ConnectionString. This application has the same references as the other project, it has the same Imports, uses the same Class to manage the database access.
I tried using the Provider "Microsoft.ACE.OLEDB.12.0" but that produces exactly the same error.
When I open the database using Office, I get the Security prompt "Enable contents...", I don't know whether this has any bearing on the matter, and if so how to open a database with this security setting.
I don't know where to go from here.
Configuration:
VS2012 Express
VB.NET
Windows 8
.NET Framework 4.5
Last edited: