WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: spl on February 18, 2024, 05:19:44 AM

Title: ACE Provider issue with WB
Post by: spl on February 18, 2024, 05:19:44 AM
This fails in WB [32 or 64 bit execution], although Provider is registered, works fine in PS and even via an Excel macro [different code syntax but same context]. I just moved to a Win11 laptop, but this was failing on my older Win10 Surface Pro. Using WB 2022C.

Code (WINBATCH) Select

cACCDB = "C:\samples\Contoso.accdb" ; basic Microsoft test db, change for your needs
cConn="Provider=Microsoft.ACE.OLEDB.16.0;data source=":cACCDB

oConn = CreateObject("ADODB.Connection")
oConn.Open(cConn)

Message("Opened",oConn)
oConn.Close()
oConn=0
Exit
Title: Re: ACE Provider issue with WB
Post by: td on February 18, 2024, 08:08:11 AM
Your WinBatch script works on my Windows 11 system but then I have multiple versions of Access installed. Your sacred PS is not relevant to the problem since PS uses a different ABI.
Title: Re: ACE Provider issue with WB
Post by: td on February 18, 2024, 09:14:48 AM
Not sure if this is relevant but here is a link to "Access Database Engine 2016 Redistributable".

https://www.microsoft.com/en-us/download/details.aspx?id=54920
(https://www.microsoft.com/en-us/download/details.aspx?id=54920)
If you do try to install it you may need to do so from the command line.

Here is a link to a discussion of the topic on Stack Overflow:

https://stackoverflow.com/questions/40360932/microsoft-ace-oledb-16-0-provider-is-not-registered-on-the-local-machine-sys
(https://stackoverflow.com/questions/40360932/microsoft-ace-oledb-16-0-provider-is-not-registered-on-the-local-machine-sys)

Again I am not sure how relevant this is to your problem as I can't duplicate it.
Title: Re: ACE Provider issue with WB
Post by: spl on February 19, 2024, 02:58:17 AM
Thanks;

The AccessDatabaseEngine 2016 was installed but not from command line. I have Office 2016. I should have mentioned error is recent and had no issues with Ace.16 Provider before. I'll keep trying.
Title: Re: ACE Provider issue with WB
Post by: spl on February 20, 2024, 02:49:51 AM
Quote from: spl on February 19, 2024, 02:58:17 AM
Thanks;

The AccessDatabaseEngine 2016 was installed but not from command line. I have Office 2016. I should have mentioned error is recent and had no issues with Ace.16 Provider before. I'll keep trying.

I ended up running cmd as admin, executed the 2010 accessdbengine with /passive and changed script to use Ace.12 and worked fine for script w/out affecting using Ace.16 for other scripts.

Off Topic: when I was stanl the thread posts were ordered from last message to initial message, as spl the order is now first=>last. Is there a way to go back to last=>first?
Title: Re: ACE Provider issue with WB
Post by: td on February 20, 2024, 07:15:35 AM
From the menu bar Profile->Look and Layout->Show most recent posts at the top.