# MS Access database connection with Ignition 7.8

**URL:** <https://forum.inductiveautomation.com/t/ms-access-database-connection-with-ignition-7-8/11256>\
**Category:** General Discussion\
**Created:** [February 23, 2016, 1:48pm UTC](https://forum.inductiveautomation.com/t/ms-access-database-connection-with-ignition-7-8/11256 "2016-02-23T13:48:05Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ted\_s](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@ted\_s](https://forum.inductiveautomation.com/u/ted_s)\
**Post date:** [February 23, 2016, 1:48pm UTC](https://forum.inductiveautomation.com/t/ms-access-database-connection-with-ignition-7-8/11256/1 "2016-02-23T13:48:05Z")

</div>

I’m trying to connect to a MS Access database with Ignition 7.8 and have been unsuccessful. All the examples I’ve found have been pre-Java 8 and the elimination of the ODBC-JDBC bridge.

I’ve been trying to use the UCanAccess driver ([http://ucanaccess.sourceforge.net/site.html](http://ucanaccess.sourceforge.net/site.html)) but haven’t been able to get it to work.

Anyone have any experience with this?

---

<div class="post-metadata">

**Author:** ![ted\_s](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@ted\_s](https://forum.inductiveautomation.com/u/ted_s)\
**Post date:** [February 23, 2016, 4:33pm UTC](https://forum.inductiveautomation.com/t/ms-access-database-connection-with-ignition-7-8/11256/2 "2016-02-23T16:33:30Z")

</div>

I was able to get this to work. Attached screenshot of the driver setup. Also, need to make sure to include all the dependent .jar files in addition to the ucanaccess jar.

---

<div class="post-metadata">

**Author:** ![DavidWisely](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/davidwisely/32/10482_2.png) [@DavidWisely](https://forum.inductiveautomation.com/u/DavidWisely)\
**Post date:** [May 30, 2017, 5:49am UTC](https://forum.inductiveautomation.com/t/ms-access-database-connection-with-ignition-7-8/11256/3 "2017-05-30T05:49:37Z")

</div>

Hi ted\_s,  
I’m trying to get this to work but not having any luck. Your screenshot of the driver setup is not available any more, could you please repost it?

I’ve tried quite a few combinations of settings, and the Database connection either says “Connecting” forever, or I get this error:

org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (UCAExc:::4.0.2 unexpected end of statement)  
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)  
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)  
at com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.getConnectionInternal(DatasourceImpl.java:224)  
at com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.runTest(DatasourceImpl.java:180)  
at com.inductiveautomation.ignition.gateway.datasource.DatasourceManagerImpl$FaultedDatasourceRetryer$1.run(DatasourceManagerImpl.java:1037)  
at com.inductiveautomation.ignition.common.execution.impl.BasicExecutionEngine$TrackedTask.run(BasicExecutionEngine.java:593)  
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)  
at java.util.concurrent.FutureTask.runAndReset(Unknown Source)  
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)  
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)  
at java.lang.Thread.run(Unknown Source)  
Caused by: net.ucanaccess.jdbc.UcanaccessSQLException: UCAExc:::4.0.2 unexpected end of statement  
at net.ucanaccess.jdbc.UcanaccessStatement.executeQuery(UcanaccessStatement.java:210)  
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)  
at org.apache.commons.dbcp.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:332)  
at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1249)  
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221)  
… 12 more  
Caused by: java.sql.SQLSyntaxErrorException: unexpected end of statement  
at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)  
at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)  
at org.hsqldb.jdbc.JDBCStatement.fetchResult(Unknown Source)  
at org.hsqldb.jdbc.JDBCStatement.executeQuery(Unknown Source)  
at net.ucanaccess.jdbc.UcanaccessStatement.executeQuery(UcanaccessStatement.java:208)  
… 16 more  
Caused by: org.hsqldb.HsqlException: unexpected end of statement  
at org.hsqldb.error.Error.parseError(Unknown Source)  
at org.hsqldb.ParserBase.unexpectedToken(Unknown Source)  
at org.hsqldb.ParserDQL.XreadSelect(Unknown Source)  
at org.hsqldb.ParserDQL.XreadQuerySpecification(Unknown Source)  
at org.hsqldb.ParserDQL.XreadSimpleTable(Unknown Source)  
at org.hsqldb.ParserDQL.XreadQueryPrimary(Unknown Source)  
at org.hsqldb.ParserDQL.XreadQueryTerm(Unknown Source)  
at org.hsqldb.ParserDQL.XreadQueryExpressionBody(Unknown Source)  
at org.hsqldb.ParserDQL.XreadQueryExpression(Unknown Source)  
at org.hsqldb.ParserDQL.compileCursorSpecification(Unknown Source)  
at org.hsqldb.ParserCommand.compilePart(Unknown Source)  
at org.hsqldb.ParserCommand.compileStatements(Unknown Source)  
at org.hsqldb.Session.executeDirectStatement(Unknown Source)  
at org.hsqldb.Session.execute(Unknown Source)  
… 19 more

7.9.2 (b2017041315)  
Oracle Corporation 1.8.0\_131

Any help appreciated.

---

<div class="post-metadata">

**Author:** ![andrea.minu](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/andrea.minu/32/3326_2.png) [@andrea.minu](https://forum.inductiveautomation.com/u/andrea.minu)\
**Post date:** [May 30, 2017, 10:36am UTC](https://forum.inductiveautomation.com/t/ms-access-database-connection-with-ignition-7-8/11256/4 "2017-05-30T10:36:28Z")

</div>

You can follow these pictures

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/5/54c8891122294c5cefedb2f5e1711ff3b4bc6cfd.PNG) ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/6/6b391bc2b826dc4857ab3533abc217600c51f7ac.PNG) ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/a/a80cafc3548134a3a26f80ea81a5608d69f93c86.PNG)

Best regards

Andrea

---

<div class="post-metadata">

**Author:** ![DavidWisely](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/davidwisely/32/10482_2.png) [@DavidWisely](https://forum.inductiveautomation.com/u/DavidWisely)\
**Post date:** [June 5, 2017, 5:13am UTC](https://forum.inductiveautomation.com/t/ms-access-database-connection-with-ignition-7-8/11256/5 "2017-06-05T05:13:01Z")

</div>

Thanks Andrea,  
I’ve tried again with the settings in your screenshots but still having no luck. I’ve tried a couple of different database files and I keep getting the same error as in my previous email.  
Any other suggestions?  
Cheers,  
David

---

<div class="post-metadata">

**Author:** ![andrea.minu](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/andrea.minu/32/3326_2.png) [@andrea.minu](https://forum.inductiveautomation.com/u/andrea.minu)\
**Post date:** [June 5, 2017, 9:08am UTC](https://forum.inductiveautomation.com/t/ms-access-database-connection-with-ignition-7-8/11256/6 "2017-06-05T09:08:51Z")

</div>

Hello

Have you insert all the jar files of ucanaccess like the my firts picture?  
moreover in my project I have used the version 3.04 of the ucanaccess, maybe this suggestion can help you

Andrea

---

<div class="post-metadata">

**Author:** ![DavidWisely](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/davidwisely/32/10482_2.png) [@DavidWisely](https://forum.inductiveautomation.com/u/DavidWisely)\
**Post date:** [June 7, 2017, 3:28am UTC](https://forum.inductiveautomation.com/t/ms-access-database-connection-with-ignition-7-8/11256/7 "2017-06-07T03:28:34Z")

</div>

Thanks Andrea,

Yes, I’ve got all the jar files as shown below. I’ll try version 3.04 and let you know how it goes.

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/e/e1725bd05e04edb70394761c0ec9c368bed13235.png)

---

<div class="post-metadata">

**Author:** ![DavidWisely](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/davidwisely/32/10482_2.png) [@DavidWisely](https://forum.inductiveautomation.com/u/DavidWisely)\
**Post date:** [June 7, 2017, 3:42am UTC](https://forum.inductiveautomation.com/t/ms-access-database-connection-with-ignition-7-8/11256/8 "2017-06-07T03:42:34Z")

</div>

Thanks Andrea, Got it working!

When I first changed the driver to version 3.04 it didn’t work, but once I deleted the database connection and recreated it, it worked straight away!

---

<div class="post-metadata">

**Author:** ![erick](https://avatars.discourse-cdn.com/v4/letter/e/bbce88/32.png) [@erick](https://forum.inductiveautomation.com/u/erick)\
**Post date:** [June 8, 2017, 1:56pm UTC](https://forum.inductiveautomation.com/t/ms-access-database-connection-with-ignition-7-8/11256/9 "2017-06-08T13:56:39Z")

</div>

I am attempting the exact same setup except my Access Database is on a remote PC.  
I am trying to use the following connection URL (jdbc:ucanaccess:////ERICK-PC/VisuaLCN/Data/SVRLATestData.mdb)

As the file is on PC name “ERICK-PC”  
And within that PC the file is located at C:\VisuaLCN\Data\SVRLATestData.mdb  
I can navigate to this file from any PC; as in it is shared properly.

I have all the jar files and the exact releases (ie ucanaccess-3.0.4 etc)

Any ideas?

---

<div class="post-metadata">

**Author:** ![erick](https://avatars.discourse-cdn.com/v4/letter/e/bbce88/32.png) [@erick](https://forum.inductiveautomation.com/u/erick)\
**Post date:** [June 8, 2017, 1:58pm UTC](https://forum.inductiveautomation.com/t/ms-access-database-connection-with-ignition-7-8/11256/10 "2017-06-08T13:58:18Z")

</div>

I forgot to post the errors I am getting…  
(and FYI I have also tried with only 2 forward slashes to no avail.)

the error is:  
Cannot create PoolableConnectionFactory (UCAExc:::3.0.4 given file does not exist: \ERICK-PC\VisuaLCN\Data\SVRLATestData.mdb)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [June 8, 2017, 2:23pm UTC](https://forum.inductiveautomation.com/t/ms-access-database-connection-with-ignition-7-8/11256/11 "2017-06-08T14:23:26Z")

</div>

You may have to set up a mapped drive before you can get this working. [This thread](http://forum.inductiveautomation.com/t/file-write-to-a-network-location/7361) covers how to make changes to the ignition.conf file to map a drive that the gateway has access to.

Once you’ve done that you can start trying different paths that use the mapped drive.

---

<div class="post-metadata">

**Author:** ![ryanjmclaughlin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryanjmclaughlin/32/4318_2.png) [@ryanjmclaughlin](https://forum.inductiveautomation.com/u/ryanjmclaughlin)\
**Post date:** [June 8, 2017, 2:58pm UTC](https://forum.inductiveautomation.com/t/ms-access-database-connection-with-ignition-7-8/11256/12 "2017-06-08T14:58:35Z")

</div>

I stopped using the mapped drive for our organization and stick to UNC paths for files in our scripts. If you ensure the Ignition Gateway service runs as a domain user (we have a dedicated service account to run Ignition) then your scripting can access any shares that the associated domain account has been granted access to. This approach works well for us because there is no addition changes to the Ignition.conf and new access is done simply by granting the domain account access to the share.

---

<div class="post-metadata">

**Author:** ![erick](https://avatars.discourse-cdn.com/v4/letter/e/bbce88/32.png) [@erick](https://forum.inductiveautomation.com/u/erick)\
**Post date:** [June 8, 2017, 8:35pm UTC](https://forum.inductiveautomation.com/t/ms-access-database-connection-with-ignition-7-8/11256/13 "2017-06-08T20:35:34Z")

</div>

Kevin,  
I have added the following in the ignition.conf file.

wrapper.share.1.location=\ERICK-PC\VisuaLCN\Data  
wrapper.share.1.target=W:  
wrapper.share.1.type=DISK  
wrapper.share.1.account=omega   
wrapper.share.1.password=7420  
wrapper.share.1.startup.premapped=CONTINUE  
wrapper.share.1.startup.max\_retries=5  
wrapper.share.1.startup.retry\_interval=10

here is the message I get back in the wrapper.log file.

Attempting to map the “\ERICK-PC\VisuaLCN\Data” share to “W:”…  
WARN | wrapper | 2017/06/08 15:11:11 | Running a service as System User disqualifies the use of an account. Ignoring wrapper.share..account  
WARN | wrapper | 2017/06/08 15:11:46 | Unable to map “W:”. Trying to continue. (The network path was not found. (0x35))

A question I have is, do I need the W drive mapped in windows as well? Currently I do not have W:\ mapped by Windows.

However, in another test I did use a Drive (Y:) that is mapped as windows and I received a similar error although slightly different.

Attempting to map the “\192.168.0.103\Data” share to “Y:”…  
WARN | wrapper | 2017/06/08 14:31:34 | Running a service as System User disqualifies the use of an account. Ignoring wrapper.share..account  
WARN | wrapper | 2017/06/08 14:31:34 | Unable to map “Y:”. Trying to continue. (The network resource type is not correct. (0x42))

What is ‘running a service as System User’ mean and how do I get around this?

---

<div class="post-metadata">

**Author:** ![nshrestha](https://avatars.discourse-cdn.com/v4/letter/n/ecb155/32.png) [@nshrestha](https://forum.inductiveautomation.com/u/nshrestha)\
**Post date:** [February 16, 2018, 3:20pm UTC](https://forum.inductiveautomation.com/t/ms-access-database-connection-with-ignition-7-8/11256/14 "2018-02-16T15:20:17Z")

</div>

Thanks Andrea, but I was only able to read through your method, but it does not write to the access database, have you found solution to writing to the database yet?

Niresh

---

<div class="post-metadata">

**Author:** ![GeraGarcia](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/geragarcia/32/18471_2.png) [@GeraGarcia](https://forum.inductiveautomation.com/u/GeraGarcia)\
**Post date:** [February 20, 2018, 3:10pm UTC](https://forum.inductiveautomation.com/t/ms-access-database-connection-with-ignition-7-8/11256/15 "2018-02-20T15:10:17Z")

</div>

Hi David.

I have download the UCanAccess-4.0.3 rigth now, then i want to installa the UCanAccess like a New JDBC Driver, but i dont find information about this procedure into the manuals, may help me about how to install the UCanAccess and all the related drivers?, Thanks.

Regards  
Gerardo Garcia

---

<div class="post-metadata">

**Author:** ![jpark](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jpark](https://forum.inductiveautomation.com/u/jpark)\
**Post date:** [February 20, 2018, 4:10pm UTC](https://forum.inductiveautomation.com/t/ms-access-database-connection-with-ignition-7-8/11256/16 "2018-02-20T16:10:29Z")

</div>

Try installing SQL Server Express and add the MS Access database as a linked server. On the gateway, make a DB Connection to sql express.

---

<div class="post-metadata">

**Author:** ![GeraGarcia](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/geragarcia/32/18471_2.png) [@GeraGarcia](https://forum.inductiveautomation.com/u/GeraGarcia)\
**Post date:** [February 21, 2018, 11:18pm UTC](https://forum.inductiveautomation.com/t/ms-access-database-connection-with-ignition-7-8/11256/17 "2018-02-21T23:18:46Z")

</div>

Thanks JPark, great solution.

---

<div class="post-metadata">

**Author:** ![dcacciamani](https://avatars.discourse-cdn.com/v4/letter/d/c2a13f/32.png) [@dcacciamani](https://forum.inductiveautomation.com/u/dcacciamani)\
**Post date:** [July 4, 2018, 5:22pm UTC](https://forum.inductiveautomation.com/t/ms-access-database-connection-with-ignition-7-8/11256/18 "2018-07-04T17:22:21Z")

</div>

Thanks Andrea, very usefull screenshots. I have sucessfully connected to the MSAccess DB

---

<div class="post-metadata">

**Author:** ![MikeBr](https://avatars.discourse-cdn.com/v4/letter/m/db5fbb/32.png) [@MikeBr](https://forum.inductiveautomation.com/u/MikeBr)\
**Post date:** [November 26, 2018, 6:27pm UTC](https://forum.inductiveautomation.com/t/ms-access-database-connection-with-ignition-7-8/11256/19 "2018-11-26T18:27:24Z")

</div>

Also many thanks Andrea…I was able to get a valid connection using your advice. We’ll see how it goes in the Ignition Designer but I am hopeful that I can display some Access table info.

One thing to note for others who may use this method:

For the default validation query…use SELECT 1 FROM DUAL as shown in the screenshot…do not use SELECT 1 (default)…doesn’t work.

---

<div class="post-metadata">

**Author:** ![cmaynes](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmaynes/32/6852_2.png) [@cmaynes](https://forum.inductiveautomation.com/u/cmaynes)\
**Post date:** [May 14, 2019, 2:48pm UTC](https://forum.inductiveautomation.com/t/ms-access-database-connection-with-ignition-7-8/11256/20 "2019-05-14T14:48:24Z")

</div>

Hey, I can confirm this is an issue with ucanaccess. pyodbc works just fine to update an MS Access database.

[Next page](https://forum.inductiveautomation.com/t/ms-access-database-connection-with-ignition-7-8/11256.md?page=2)
