Missing component (ACE0DBC.DLL) when I try to use pyodbc in python 3.6 - pyodbc

I am using the 32-bit version on python and, although my computer is a 64-bit computer, I have successfully installed pyodbc 32-bit windows version. My Microsoft Access is also the 32 bit version.
When I query pyodbc for drivers, it shows both drivers.
[x for x in pyodbc.drivers() if x.startswith('Microsoft Access Driver')]
yields
['Microsoft Access Driver (*.mdb)', 'Microsoft Access Driver (*.mdb, *.accdb)']
Using examples in other places, I build a connection string "c" as follows
c= (
r'DRIVER={Microsoft Access Driver (*.mdb, *.accdb)};'
r'DBQ=C:\users\815001\Documents\Database6.accdb;'
)
I then try to connect with
cnxn=pyodbc.connect(c)
This results in the following error message:
Traceback (most recent call last):
File "", line 1, in
cnxn=pyodbc.connect(c)
pyodbc.InterfaceError: ('IM003', '[IM003] Specified driver could not be loaded due to system error 126: The specified module could not be found. (Microsoft Access Driver (*.mdb, *.accdb), C:\Program Files (x86)\Common Files\Microsoft Shared\OFFICE16\ACEODBC.DLL). (160) (SQLDriverConnect)')
I have checked the location and indeed there is no ACE0DBC.DLL file in C:\Program Files (x86)\Common Files\Microsoft Shared\OFFICE 16.
Where do I go to get it? I tried looking up ACE0DBC.DLL in the search engine on this web page and it yielded no results.

You can get Microsoft Access Database Engine 2016 here:
https://www.microsoft.com/en-us/download/confirmation.aspx?id=54920

Related

sqldeveloper wont open

I've just installed Oracle 11g express on Windows 10, but I can't seem to launch SQLDeveloper.
i'm double clicking the sqldeveloper but nothing happens, no error , nothing.
sqldeveloper version: 20.2.0.175.1842-x64
I've also tried to run from sqldeveloper/bin/sqldeveloper.exe
and I've tried launching sqldeveloper.exe from the console, but I'm not getting error messages in the console.
how should i check what is the problem?
i have install java and java jdk8u271
this is my set:
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\snirbenyosef\AppData\Roaming
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=SNIRBENYOSEC8E4
ComSpec=C:\Windows\system32\cmd.exe
DriverData=C:\Windows\System32\Drivers\DriverData
FPS_BROWSER_APP_PROFILE_STRING=Internet Explorer
FPS_BROWSER_USER_PROFILE_STRING=Default
HOMEDRIVE=C:
HOMEPATH=\Users\snirbenyosef
LOCALAPPDATA=C:\Users\snirbenyosef\AppData\Local
LOGONSERVER=\\SNIRBENYOSEC8E4
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
Path=C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\oraclexe\app\oracle\product\11.2.0\server\bin;;C:\Program Files (x86)\Parallels\Parallels Tools\Applications;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\snirbenyosef\AppData\Local\Microsoft\WindowsApps;
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 142 Stepping 10, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=8e0a
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
PUBLIC=C:\Users\Public
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\Windows
TEMP=C:\Users\SNIRBE~1\AppData\Local\Temp
TMP=C:\Users\SNIRBE~1\AppData\Local\Temp
USERDOMAIN=SNIRBENYOSEC8E4
USERDOMAIN_ROAMINGPROFILE=SNIRBENYOSEC8E4
USERNAME=snirbenyosef
USERPROFILE=C:\Users\snirbenyosef
windir=C:\Windows
just move the sql developer to desktop of windows and not the linked to mac. solved it.

Connect to HSQLDB 2.5 via Windows ODBC PostgreSQL driver

I am having a problem configuring the Windows PostgreSQL ODBC driver to connect to HSQLDB 2.5.0. As per the HSQLDB documentation I have installed version 11.01 of the PostgreSQL ODBC driver. When I test the connection from the ODBC Data Source Administrator I see the following in the ODBC log file: [0.000]Driver Version='11.01.0000,May 24 2019' linking 1915 dynamic Multithread library
[0.000]PQconnectdbParams: host='localhost' port='9001' dbname='test' user='test' sslmode='disable' password='test'
[0.109]PQsendQuery: 000000000033BCA0 'SET DateStyle = 'ISO';SET extra_float_digits = 2;show transaction_isolation'
[0.109] (ERROR) 42501 'user lacks privilege or object not found: DATESTYLE'
[1.157]PQfinish: 000000000033BCA0
It looks like the driver is sending a "SET DateStyle" command that HSQLDB doesn't understand. I've tried changing all the datasource options with no success. I have tried both the Unicode and ANSI versions of the driver.
The documentation on the web site is for version 2.5.1 which is in Release Candidate stage. You can download a snapshot jar from http://hsqldb.org/download/

Error when trying to connect to Teradata as source using Attunity

I am getting the following error when I try to connect to Teradata as source using attunity
"SYS-E-HTTPFAIL, Cannot connect to ODBC provider Fatal error has occurred."
I have restarted Attunity console and server
screenshot of the error
I confirmed that Teradata ODBC is installed and I can connect to Teradata
There are multiple reasons for these errors:
1- In my case I needed to update the environment variable and ensure to enter the correct path to Teradata ODBC driver
2- Other reasons for the error is ensure you are running a 64 bit ODBC driver matching Attunity 64 bit download

SQLBase error HY092

I'm trying to config a connection with SQLBase with odbc driver on Windows and I never did that, but I'm getting the error:
Connection failed with SQL State: "HY092"
I'm using the Windows ODBC Administrator to try add the connection. In the field "Config Filename (INI)" of the configuration screen I put: "C:\Program Files (x86)\Centura\sql.ini" and I add "C:\Program Files (x86)\Centura\" to the PATH system variable.
In the application (.NET) I'm getting the message:
ERROR [HY092] [Gupta][ODBC Driver]Invalid attribute/option identifier
My sql.ini file has the content:
[win32client]
clientname=CWBXXX
[win32client.dll]
comdll=sqlws32
[win32client.
serverpath=server3,<SERVER_IP>,2155/<BASE_NAME>
Anyone could help me? Thank you.
Good to see you are using SQLBase . Awesome.
Two important settings to get right.
1) Make sure you are using the correct ODBC administrator
I'm guessing 32 bit in %systemdrive%\Windows\SysWoW64\odbcad32.exe.
If not , use the 64bit one in %systemdrive%\Windows\System32\odbcad32.exe.
Under System DSN tab Add the correct driver for the database. Either 'Centura SQLBase 3.6 32bit Driver' or the 'Gupta SQLBase 12.x' driver if you are running SQLBase 12.
Under the Configure Tab, specify the Data Source Name that you will use in your sql.ini. THEY MUST MATCH.
2)a. Make sure you only ever have 1 sql.ini on the client. Ever.
2)b. sql.ini needs the ODBC driver specified in the client section:
[win32client.dll]
comdll=sqlodb32
[odbcrtr]
odbctrace=off
longbuffer=32767
buffrow=10000
remotedbname=[dB Name specified in ODBC] ,
DSN=[Data Source Name specified in ODBC]
(without the square brackets eg. remotedbname=MyDatabase,DSN=MyDatasetName whatever names you have specified in ODBC admin.)

fail to make pyodbc-4.0 64bit find excel driver (windows10-64bit)

I don't catch how to connect to my excel file with pyodbc4, on windows 10 64 bit (python-3.6). As anybody a clue on my error in this code ?
import pyodbc
import os
sources = pyodbc.dataSources()
dsns = list(sources.keys())
dsns.sort()
sl = []
for dsn in dsns:
sl.append('%s [%s]' % (dsn, sources[dsn]))
print('\n'.join(sl))
# DATABASE CONNECTION
filename = 'C:\\WinPython\\basedir36\\buildZero\\winpython-64bit-3.6.x.1\\notebooks\\test.xls'
assert os.path.exists(filename)
# was wrong: CNXNSTRING = 'Driver={Microsoft Excel Driver (*.xls)};DBQ=%s;READONLY=FALSE' % filename
CNXNSTRING = 'Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=%s;READONLY=FALSE' % filename
print ('CNXNSTRING is ', CNXNSTRING)
cnxn = pyodbc.connect(CNXNSTRING, autocommit=True)
result-in-64bit:
>>>
RESTART: C:/WinPython/basedir36/buildZero/winpython-64bit3.6.x.1/notebooks/TEST6.py
Excel Files [Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)]
MS Access Database [Microsoft Access Driver (*.mdb, *.accdb)]
dBASE Files [Microsoft Access dBASE Driver (*.dbf, *.ndx, *.mdx)]
CNXNSTRING is Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\WinPython\basedir36\buildZero\winpython-64bit-3.6.x.1\notebooks\test.xls;READONLY=FALSE
Traceback (most recent call last): File "C:/WinPython/basedir36/buildZero/winpython-64bit-3.6.x.1/notebooks/TEST6.py", line 17, in <module>
cnxn = pyodbc.connect(CNXNSTRING, autocommit=True)
pyodbc.Error: ('IM002', '[IM002] [Microsoft][Gestionnaire de pilotes ODBC] Source de donn�es introuvable et nom de pilote non sp�cifi� (0) (SQLDriverConnect)')
>>>
NEW findings: it works if I use pyodbc4- 32 bit and python-3.6 32 bit... so how to make it work in 64 bit ?
result-in-32bit:
>>>
RESTART: C:\WinPython\basedir36\buildZero\winpython-32bit-3.6.x.1\notebooks\TEST6.py
Excel Files [Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)]
MS Access Database [Microsoft Access Driver (*.mdb, *.accdb)]
dBASE Files [Microsoft Access dBASE Driver (*.dbf, *.ndx, *.mdx)]
CNXNSTRING is Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\WinPython\basedir36\buildZero\winpython-64bit-3.6.x.1\notebooks\test.xls;READONLY=FALSE
>>>
it works if I use pyodbc4- 32 bit and python-3.6 32 bit... so how to make it work in 64 bit ?
If the script is running under 64-bit Python then it needs to have the 64-bit version of the Excel ODBC driver installed.
There is an old office 2007 32 bit on this pc
It is possible to do a "forced install" of the 64-bit Access Database Engine (which includes the Access and Excel ODBC drivers) alongside a 32-bit version of Office, but that is not recommended because in some circumstances it can break the Office install. (It is called a "forced install" because the default behaviour of the Access Database Engine installer is to prevent it from happening.)
If the "old office 2007" is no longer being used then you can uninstall it and then install the 64-bit version of the Access Database Engine. If it is still being used then you probably should just stick with running the Python script as 32-bit.

Resources