Page 1 of 1

'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine

Posted: Thu Jan 30, 2020 10:31 am
by MCblogiz
Hi,
i am trying some code with ironpython odbc connection, but always getting
Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine
Tried mdb instead of accdb file with ODBC provider, tried other versions of access database engine, tried x86 and x64 versions. No success.
Maybe nicelabel needs specific connection string or code isn't correct?

Nicelabel info:

Nicelabel 2017 Powerforms
Version 17.2
Build 1825

Code: Select all

import clr
import System
clr.AddReference("System.Data")

from System.Data import DataSet
from System.Data.OleDb import OleDbConnection, OleDbDataAdapter, OleDbCommand


conStr = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myAccessFile.accdb;Persist Security Info=False;"

con = OleDbConnection(conStr)

query = "SELECT * FROM dazai"

adapter = OleDbDataAdapter(query, con)
ds = DataSet()
con.Open()

"*"

con.Close()

Re: 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine

Posted: Thu Jan 30, 2020 2:57 pm
by Kyleodonnell
MCblogiz

Are you not connecting the database to the label or form directly? What is the use case of using iron python to query against the database?

Re: 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine

Posted: Thu Jan 30, 2020 3:23 pm
by MCblogiz
Because I want to use that in the function to get data without using events SQL statement.

Re: 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine

Posted: Thu Jan 30, 2020 5:15 pm
by Kyleodonnell
MCblogiz,

We recommend opening a support case as the support team will need your files https://www.nicelabel.com/support