Skip to main content
Inspiring
September 12, 2017
Question

CF16 and Access datasource

  • September 12, 2017
  • 2 replies
  • 5414 views

Since Coldfusion version 3, I work with Access datasources for information systems built with CF.

Access datasource does still work with Coldfusion version 11.

Then , with Coldfusion version 16,

after days ans days of trials, CF16 cannot create Access datasource anymore !

So , will next version of Coldfusion will be back with this historical functionnality ?

All my work is based on this.

Stays with CF11 for the moment.

Thanks for any comment.

I have never seen a new software version abandonning an historical and great functionnality.

Pierre.

This topic has been closed for replies.

2 replies

BKBK
Community Expert
Community Expert
October 2, 2017

Hi @Plarts,

Make a record of the installation and configuration steps that you followed. Also record the error messages. Then report a bug. I think that that is the fastest way to get back Access.

plartsAuthor
Inspiring
October 8, 2017

Thanks for all your recommandations,

But we spent too much time for this, days and days and days,

we did not choose ColdFusion to loose so much time.

Now my client is asking and waiting for a dregrade to CF11.

I hope that Access datasource will be back in next version of ColdFusion.

I work with this architeture since version 3 of CF with very great success.

I do not understand why Adobe do not do the necessary to make Access datasource working with CF16.

All screens in CFadmin are there to do it as usual, but not working.

Too simple from Adobe to say :  it is not supported.

If you know that this historical functionnality will be reactivated in next version of CF,

thanks to tell me.

That will be a technical direction decision to be taken for us.

Pierre.

Participating Frequently
October 2, 2017

Plarts;   We both visited a couple of threads regarding CF16 this summer.  I was searching for an MS Access solution for new install of CF2016 Server and MS Server 2016.  The ODBC solutions suggested in dozens of posts from 2017 backwards did not work.

I followed BKBK's suggestion to use HXTT  JDBC solution.    Re: accdb with CF9 under Win2008 R2 64bit

My search brought me to HXTT's JDBC driver for MS Access.

Repost of BKBK's 2012 solution:

(After the customary virus scan) I unpacked their access.zip file, copied the essential file Access_JDBC40.JAR from /access/lib/ to ColdFusion's lib directory. That's all there is to installing the driver. I then restarted ColdFusion.

I went to the ColdFusion Administrator and configured a datasource as follows:

Data Source Name: myAccessDSN

Driver: Other

JDBC URL: jdbc:access:/C:/Users/BKBK/Documents/myDB.accdb

Driver Class: com.hxtt.sql.access.AccessDriver

Driver Name: com.hxtt.sql.access.AccessDriver


Participant
January 19, 2018

I followed your steps

My search brought me to HXTT's JDBC driver for MS Access.

 

Repost of BKBK's 2012 solution:

 

(After the customary virus scan) I unpacked their access.zip file, copied the essential file Access_JDBC40.JAR from /access/lib/ to ColdFusion's lib directory. That's all there is to installing the driver. I then restarted ColdFusion.

 

I went to the ColdFusion Administrator and configured a datasource as follows:

 

Data Source Name: myAccessDSN

Driver: Other

 

JDBC URL: jdbc:access:/C:/Users/BKBK/Documents/myDB.accdb

Driver Class: com.hxtt.sql.access.AccessDriver

Driver Name: com.hxtt.sql.access.AccessDriver

 

 

and I got ok status

 

 

However, it only works partially. It is asking for $3xx to get a full version.

BKBK
Community Expert
Community Expert
February 12, 2018

That is quite an old solution. There is a more recent alternative, which is Open Source, hence free: UCanAccess.

I did a test, and had it up and running on ColdFusion 2016 within 10 minutes. I followed these steps:

1. From the UCanAccess website, download the current ZIP file, UCanAccess-4.0.3-bin.zip.

2. Unzip it.

3. Copy the following JAR files from the directories UCanAccess-4.0.3-bin and UCanAccess-4.0.3-bin/lib to the the lib directory of your ColdFusion installation (my ColdFusion lib directory is: C:\ColdFusion2016\cfusion\lib on Windows):

ucanaccess-4.0.3.jar

commons-lang-2.6.jar

commons-logging-1.1.3.jar

hsqldb.jar

jackcess-2.1.9.jar

4. Restart Coldfusion.

That's it. The UCanAccess Java JDBC Driver for Microsoft Access is now installed.

I then successfully ran the following test code:

<cfscript> 

driver = createobject("java", "java.lang.Class").forName("net.ucanaccess.jdbc.UcanaccessDriver");

connection =createobject("java", "java.sql.DriverManager").getConnection("jdbc:ucanaccess://C:/Users/BKBK/Documents/new_user_database/CompassTravel.mdb");

stmt = connection.createStatement();

resultSet  = stmt.executeQuery("select * from employees_with_department");

writeoutput("First Names:" & "<br>")

while (resultSet.next()) {

     writeoutput(resultSet.getString("firstname") & "<br>");     

}

</cfscript>

Notes:

My test Access database is located at C:/Users/BKBK/Documents/new_user_database/CompassTravel.mdb.

It has a table called employees_with_department.

The table has a column called firstname.