November 29, 2021
ColdFusion2021 on Windows Server 2019 datasource connect to MS Access dont work
Comments
(3)
November 29, 2021
ColdFusion2021 on Windows Server 2019 datasource connect to MS Access dont work
Newbie 1 posts
Followers: 0 people
(3)

Hello can someone tell me how i connect in CF 2021 to a Access Databe (*.accd)  I have try servel things nothing works

– Install the Demo Version CF 2021 on a brand new Windows Server 2019

nstallation Type:
Server configuration

Licensing:
30-day trial

Installation Directories:
Product: C:ColdFusion2021
Web Root: C:ColdFusion2021cfusionwwwroot

Server Information:
Web Server: Built-in web server
Hostname / IP Address: BS09
Admin Port: 8500
ODBC Services: not installed  ???
ColdFusion Server Profile: Production Profile
ColdFusion Solr Search Services: installed
ColdFusion Pdfg Services: installed
ColdFusion .NET Integration Services: installed
Microsoft .NET version: v4.0.30319
.NET Java Port: 6097
.NET Client Port: 6098
RDS: disabled

If yi add a Databse to the CF Server i got this Error:
•Unable to update the NT registry.
Variable DRIVERPATH is undefined

Can someone help me ?

3 Comments
2021-12-13 03:13:59
2021-12-13 03:13:59

TAC-CH, did you get around to solving your issue? I will note that I have CF2021 running on Windows Server 2019, and I AM able to create a DSN for an Access db. To be clear, I also did not have to create any 64-bit (or 32-bit) ODBC DSN (in the Windows ODBC control panel) first. That has been suggested in past CF versions (like Mike did here also), but I’m just confirming it was not needed.

I’ll add that (and confirming Mike’s comment) I had indeed installed the more recent CF2021 installer (from Sep 2021, rather than the initial one available from Nov 2020 until then).

And to be clear, that DID (for me) setup the ColdFusion 2021 ODBC services. You show those lines indicating that they were not installed for you. I don’t recognize those lines (I did not find anything matching them in the CF Admin settings summary, system info page, or the CF2021 install log. Can you share where you got them?) Are you saying that in Windows Services you do not see the CF ODBC services?

And I can confirm that in the CF2021 installer, it does not present the ODBC services as an option, when it presents the other optional services that can be enabled, like the PDFG, Solr, and .NET services.

One last thing: I had NOT installed MS Access itself, nor the MS DB engine redistributable that some have suggested in recent releases as being needed for the CF Access/ODBC setup to work.

Of course, Priyank helpfully offered  the UcanAccess JDNC driver as another option, and that’s certainly another way to solve the problem.

As for whether one SHOULD still be using MS Access at all in the year 2021, that’s another question, but some feel their hands are tied, so I just wanted to share in this reply, for those who may wonder “can CF2021 successfully create an Access DSN, especially on Windows Server 2019”, yes it can. I’ve also confirmed it on Windows 10, FWIW.

Like
2021-11-30 21:25:28
2021-11-30 21:25:28

Also,

Make sure to get the latest updater for CF2021, the first release had an issue with the ODBC services.  Once those are running, you want to define the Access file using the Windows ODBC 64 bit UI as a system datasource.  Then define it inside the CF DSN page with the same name.  It may not verify inside CF Admin but it will work with the cfquery tag.

Like
2021-11-29 20:55:15
2021-11-29 20:55:15

You can try with Ucanaccess jdbc driver.

https://sourceforge.net/projects/ucanaccess/files/

JDBC URL – jdbc:ucanaccess://C:/Temp/my.accdb;showSchema=true

Driver Class – net.ucanaccess.jdbc.UcanaccessDriver

 

Like
Add Comment