Hi, I would like to know if and how you can manage database 'Access' MDB file with B4J.
Thanks
Marco
Thanks
Marco
You can use Jackcess library. It should work with B4J as well.
Another option is to download a JDBC driver that supports Access dbs and then use it with SQL library.
Program started.
AppInit :: Start
Database file: C:\DOKUME~1\XPMUser\EIGENE~1\B4J\B4JHOW~1\B4JHOW~1\Objects\cars.mdb
Init sql connection...
java.lang.RuntimeException: java.lang.IncompatibleClassChangeError: Found class com.healthmarketscience.jackcess.Database, but interface was expected
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:113)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:69)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:84)
at b4j.example.main.start(main.java:33)
at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319)
at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:216)
at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:179)
at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:176)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:176)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:76)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:17)
at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:67)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.IncompatibleClassChangeError: Found class com.healthmarketscience.jackcess.Database, but interface was expected
at net.ucanaccess.jdbc.DBReference.<init>(DBReference.java:147)
at net.ucanaccess.jdbc.DBReferenceSingleton.loadReference(DBReferenceSingleton.java:57)
at net.ucanaccess.jdbc.UcanaccessDriver.connect(UcanaccessDriver.java:100)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:215)
at anywheresoftware.b4j.objects.SQL.Initialize2(SQL.java:48)
at anywheresoftware.b4j.objects.SQL.Initialize(SQL.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:504)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:215)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:153)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
... 14 more
Hi Manios,
have you downloaded the msaccess drivers from the reference site & installed into your additional libraries folder?
If not, pls find the drivers and an update of the example project:
MS Access Database Driver - copy to B4J additional libraries folder
http://www.rwblinn.de/b4j/dbdrivers/dbdrivermsaccess.zip
MS Access Example
http://www.rwblinn.de/b4j/b4jhowto/examples/b4jhowtomsaccess.zip
Hi everybody.
I 'm looking for examples B4J + MsAccess db but the above links don't work.
Are there any examples that I could download?
I have opened the project B4JHowToMsAccess in the IDE.
I open the designer (Designer->Open internal designer) and I get an error:
View attachment 70345