Home
Analytics
how to use ms access file.accdb as a data source
lump
<p>Hey at all,</p>
<p> </p>
<p>I want to use a MS Access database (.accdb) as a data source for my BIRT report. But I can not get a working connection.</p>
<p>I tried a lot of different Drivers (.jar) to solve this problem. Some of them, which worked for a short time, aren't free and you can't use them anymore after a time or a couple of queries. Some others weren't able to connect to the database.</p>
<p> </p>
<p>Now I'm trying to use ucanaccess driver. I could create a data source and the test Connection was also successful, but if i want to create a data set, there are no available items from the database for the query...</p>
<p> </p>
<p>At this Point I'm really desperate.</p>
<p> </p>
<p>Hope anyone can help me.</p>
<p> </p>
<p>Thank you very much!!!</p>
Find more posts tagged with
Comments
Clement Wong
<p>From my experience with the ucanaccess driver, you are not able to see the Available Items under the "MS Access Data Source" to browse the objects. I'm not sure why it's behaving this way.</p>
<p> </p>
<p>However, you can still write a query in the Query Text and have results returned in the Data Set. You will still be able build and run your report.</p>
<p> </p>
<p>In my example, I used the Northwind sample database.</p>
<p> </p>
<p><u>Data Source</u></p>
<p>Driver Class: net.ucanaccess.jdbc.UcanaccessDriver</p>
<p>Driver URL: jdbc:ucanaccess://C:/temp/northwind.accdb</p>
<p> </p>
<p><u>Data Set Query</u></p>
<p>SELECT * FROM PRODUCTS</p>
jlB_HdF
<p>hi<br>
I reactivate this topic because I have got the same problem.<br><br>
My configuration :</p>
<p style="margin-left:40px;">Windows 10 Enterprise 64 bits<br>
BIRT under Eclipse Neon2 (4.6.2)<br>
UCanAccess 4.0.0 as jdbc driver<br>
Access 2016</p>
<p>
What I did :</p>
<p style="margin-left:40px;">Manage JDBC Drivers :</p>
<p style="margin-left:80px;">File Name :ucanaccess-4.0.0.jar<br>
Original Location : C:\Users\Me\Documents\Driver_jdbc\UCanAccess-4.0.0-bin\ucanaccess-4.0.0.jar</p>
<p style="margin-left:40px;"><br>
Create a new data source :</p>
<p style="margin-left:80px;">Driver Class : net.ucanaccess.jdbc.UcanloadDriver<br>
Database URL : jdbc:ucanaccess://C:/Users/Me/BdD.accdb</p>
<p>
The problem :</p>
<p style="margin-left:40px;">Test connection : Failed to create a connection. Please verifiy the connection properties</p>
<p style="margin-left:40px;"> </p>
<p style="margin-left:40px;">The details :</p>
<p style="margin-left:40px;">org.eclipse.datatools.connectivity.oda.OdaException: Failed to create a connection. Please verify the connection properties.<br>
at org.eclipse.birt.report.data.oda.jdbc.ui.profile.JDBCSelectionPageHelper$TestInProcessDialog$TestConnectionJob$1.run(JDBCSelectionPageHelper.java:218)<br>
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)<br>
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182)<br>
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4211)<br>
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3827)<br>
at org.eclipse.jface.window.Window.runEventLoop(Window.java:818)<br>
at org.eclipse.jface.window.Window.open(Window.java:794)<br>
at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:396)<br>
at org.eclipse.birt.report.data.oda.jdbc.ui.profile.JDBCSelectionPageHelper$8.widgetSelected(JDBCSelectionPageHelper.java:1036)<br>
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249)<br>
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)<br>
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418)<br>
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)<br>
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236)<br>
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824)<br>
at org.eclipse.jface.window.Window.runEventLoop(Window.java:818)<br>
at org.eclipse.jface.window.Window.open(Window.java:794)<br>
at org.eclipse.birt.report.designer.data.ui.actions.NewDataSourceAction.run(NewDataSourceAction.java:127)<br>
at org.eclipse.jface.action.Action.runWithEvent(Action.java:473)<br>
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565)<br>
at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:397)<br>
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)<br>
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418)<br>
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)<br>
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236)<br>
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824)<br>
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)<br>
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)<br>
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)<br>
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)<br>
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)<br>
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)<br>
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)<br>
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)<br>
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)<br>
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)<br>
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)<br>
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)<br>
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)<br>
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br>
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br>
at java.lang.reflect.Method.invoke(Unknown Source)<br>
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)<br>
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)<br>
at org.eclipse.equinox.launcher.Main.run(Main.java:1519)<br>
at org.eclipse.equinox.launcher.Main.main(Main.java:1492)</p>
<p> </p>
<p> </p>
<p>Thanks by advance for your help<br>
</p>
CodeRookie
<p>I think you need to move the jar file to where your designer is installed. For me, this is the location:</p>
<p> </p>
<p>C:\Actuate3\BDPro\eclipse\plugins\org.eclipse.birt.report.data.oda.jdbc_4.4.0.v20150206-1039\drivers</p>
<p> </p>
<p>Hope this helps.</p>
<p> </p>
<p>Scott</p>
jlB_HdF
<p>A great thank for your advice Scott<br>
The driver was already in this repertory. Probably when I have used the Manage Driver.<br>
By security I have also duplicated the sub repertories (lib and loader).<br>
The result is the same</p>
<p> </p>
<p>Jean-Luc</p>
pricher
<p>Hi,</p>
<p> </p>
<p>Try putting the 4 jar files from the ucanaccess lib folder in the same folder where ucanaccess-4.0.0.jar is installed.</p>
<p> </p>
<p>Hope this helps,</p>
<p> </p>
<p>P.</p>
jlB_HdF
<p>Hi</p>
<p> </p>
<p><span><span>Unfortunately there is no improvement</span></span></p>
<p> </p>
<p><span><span>JL</span></span></p>
pricher
<p>Works for me in BIRT 4.6.0. </p>
<p> </p>
<p>P.</p>
jlB_HdF
<p>Hi</p>
<p> </p>
<p><strong>After a new try, I confirm, it is OK !</strong>
<br>
I thank you Scott and Pierre for your help.<br><br>
For everybody who have the same problem :</p>
<p style="margin-left:40px;">In the directory</p>
<p style="margin-left:80px;">C:\eclipse\plugins\org.eclipse.birt.report.data.oda.jdbc_4.6.0.v201606072122\drivers\</p>
<p style="margin-left:40px;">You have to copy the 5 .jar</p>
<p style="margin-left:80px;">commons-lang-x.y<br>
commons-logging-x.y.z<br>
hsqldb<br>
jackcess-x.y.z<br>
ucanaccess-x.y.z</p>
<p>
Pierre, do you have any other advices about communication between BIRT UCanAccess and Access ?<br><br>
JL</p>