Open hosseinakbariann opened 5 years ago
Hi,
It is mean that the Access Database Engine is not found by node-adodb.
If you have installed x64 version of the engine, you should use :
const connection = ADODB.open('Provider=Microsoft.Jet.OLEDB.4.0;Data Source=node-adodb.mdb;', true);
API: ADODB.open(connection[, x64]): ADODB
Initialization database link parameters.
@SkeletonGamer Maybe you can help me (I'm facing the same problem). I'm running on Windows 10 64bit with MS Office 365 64bit and I installed the MS Access Database Engine 2016 (found here https://www.microsoft.com/en-us/download/details.aspx?id=54920). No matter what connection string I use, it always ends in an error:
ADODB.open('Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=test.accdb', true)
{
"code": -2147217865,
"message": "[Microsoft][ODBC Excel Driver] The Microsoft Access database engine could not find the object 'TestTable'. Make sure the object exists and that you spell its name and the path name correctly. If 'TestTable' is not a local object, check your network connection or contact the server administrator."
}
TestTable
exists and can be queried w/o problems in Access directly. Do you have any idea?
@jonazuberbueler You want to connect Access database with Excel ODBC connector. It is normal that is does not work.
You should use :
ADODB.open('Provider=Microsoft.ACE.OLEDB.15.0;Data Source=test.accdb;Persist Security Info=False;', true)
Yeah sorry, copy paste error... issue still is the same. Thx anyway
On 22 Aug 2019, 18:16 +0200, Jérémy Carrat notifications@github.com, wrote:
@jonazuberbueler You want to connect Access database with Excel ODBC connector. It is normal that is does not work. You should use : ADODB.open('Provider=Microsoft.ACE.OLEDB.15.0;Data Source=test.accdb;Persist Security Info=False;', true) — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
Apparently the I tried connecting to was created with a newer version of Access. When I create a new DB on the machine I'm working on it all works perfectly...
Hi I am having the same issue. All works fine with 2003 provider and mdb files but I cannot open an accdb file. I have installed the latest redistributable - several times!:) I have tried links for 2010 and 2016 redistributables. Both seem to install but no effect.
I have tried all of the following strings...
Provider=Microsoft.ACE.OLEDB.16.0;Data Source=test2.accdb; Persist Security Info=False;
Provider=Microsoft.ACE.OLEDB.15.0;Data Source=test2.accdb; Persist Security Info=False;
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=test2.accdb; Persist Security Info=False;
I just cannot get to work. Anybody any ideas what I could be doing wrong?
Further...
I have used PowerShell to confirm the OLE Provider is installed...
enumerated,,,
foreach ($provider in [System.Data.OleDb.OleDbEnumerator]::GetRootEnumerator())
with following output confirmed...
SOURCES_NAME : Microsoft.ACE.OLEDB.12.0
SOURCES_PARSENAME : {3BE786A0-0366-4F5C-9434-25CF162E475E}
SOURCES_DESCRIPTION : Microsoft Office 12.0 Access Database Engine OLE DB Provider
SOURCES_TYPE : 1
SOURCES_ISPARENT : False
SOURCES_CLSID : {3BE786A0-0366-4F5C-9434-25CF162E475E}
SOURCES_NAME : Microsoft.ACE.OLEDB.16.0
SOURCES_PARSENAME : {3BE786A2-0366-4F5C-9434-25CF162E475E}
SOURCES_DESCRIPTION : Microsoft Office 16.0 Access Database Engine OLE DB Provider
SOURCES_TYPE : 1
SOURCES_ISPARENT : False
SOURCES_CLSID : {3BE786A2-0366-4F5C-9434-25CF162E475E}
Stuck don't know how to proceed .,, any help greatly received.
OK, so I solved my problem. Putting it here in case anyone has same issue. It seems that the library has a dependency on on the 32 bit version of the MS Access redistributable!
Could you tell me abit more about how you fixed it please.
Follow this link to download the necessary redistributable but make sure you select the 32 install and not the X64 when you are presented with the option.
I had to spend a little time on my system removing the different X64 systems I had already installed first.
I just ran into this issue. Running this command in both the 32-bit and 64-bit versions of Powershell, I discovered that one of my machines had the 64-bit, but not 32-bit version of the provider:
PS C:> (New-Object system.data.oledb.oledbenumerator).GetElements() | select SOURCES_NAME, SOURCES_DESCRIPTION
The solution:
const isX64 = true;
const providerString = `Provider=Microsoft.ACE.OLEDB.12.0;Data Source=${msAccessDbPath};Persist Security Info=False;`;
const connection = ADODB.open(providerString, isX64);
My other machine had no 64-bit providers, but it had 32-bit versions of both 12.0 and 16.0. Either version, 12 and 16, seemed to work for me:
const isX64 = false;
const providerVersion = '16.0'; // or '12.0'
const providerString = `Provider=Microsoft.ACE.OLEDB.${providerVersion};Data Source=${msAccessDbPath};Persist Security Info=False;`;
const connection = ADODB.open(providerString, isX64);
I have an error in execution this module for reading access file.
{"code":-2146824582,"message":"Provider cannot be found. It may not be properly installed."}
what is that mean?