Reputation: 1703
I want to connect to the access 2010 database from excel.I am using VBA.I wrote the connection string as
Public objCon As New ADODB.Connection
objCon.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & ActiveWorkbook.Path & _
"\asset_database.accdb;ACE OLEDB:Database Password=password;"
But it is giving the error "could not find installable ISAM".What is this error?
Upvotes: 3
Views: 40573
Reputation: 9546
If you have Access installed, or you install the Access Database Engine on the workstation that has the Excel spreadsheet open, then you don't need to create an OLEDB connection; you can just open a database object as follows:
dim db as database
set db=opendatabase("c:\db path\my db.accdb")
Upvotes: -1
Reputation: 1768
Try "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & ActiveWorkbook.Path & "\asset_database.accdb;JET OLEDB:Database Password=password;"
Upvotes: 2
Reputation: 91376
Oddly enough, it is Jet OLEDB Password, not ACE:
objCon.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & ActiveWorkbook.Path _
& "\asset_database.accdb;Jet OLEDB:Database Password=password;"
See: http://www.connectionstrings.com/access-2007
Upvotes: 7