Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connection string for Access 2010

Tags:

vba

ms-access

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?

like image 573
Nagendra Avatar asked Sep 18 '26 11:09

Nagendra


1 Answers

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

like image 63
Fionnuala Avatar answered Sep 21 '26 04:09

Fionnuala