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

Label printing integration (NiceWatch middleware and ActiveX programming interface)

Moderators: Georges, milos, NiceLabel Support Team

Post Reply
MCblogiz
Newcomer
Posts: 5
Joined: Wed Jan 15, 2020 1:00 pm

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

Post by MCblogiz » Thu Jan 30, 2020 10:31 am

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()

User avatar
Kyleodonnell
NiceLabel Support
NiceLabel Support
Posts: 530
Joined: Mon Aug 28, 2017 3:07 pm

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

Post by Kyleodonnell » Thu Jan 30, 2020 2:57 pm

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?

MCblogiz
Newcomer
Posts: 5
Joined: Wed Jan 15, 2020 1:00 pm

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

Post by MCblogiz » Thu Jan 30, 2020 3:23 pm

Because I want to use that in the function to get data without using events SQL statement.

User avatar
Kyleodonnell
NiceLabel Support
NiceLabel Support
Posts: 530
Joined: Mon Aug 28, 2017 3:07 pm

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

Post by Kyleodonnell » Thu Jan 30, 2020 5:15 pm

MCblogiz,

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

Post Reply