B4A Library Jackcess library - uses MS Access database files

For access to later Access databases you can try this



The Jackcess library lets you read and update MS Access database files (mdb files). It supports Access versions 200 to 2010.

The library wraps the Jackcess Java library - details and licensing information are in the archive and the xml documentation.

Jackcess1.0.zip
 
Last edited:

Beja

Expert
Licensed User
Longtime User
Some screen shots (Note the first screenshot is the last picture)
33df8eq.png


mutuzo.png


90aql3.png
 

Christos Dorotheou

Member
Licensed User
Longtime User
Dear All, I would like to use Jackcess library so I can open an Access 2003 mdb file, in an application I am writing with B4J, even though I have follow all
suggestions and carefully placed all needed JAR files into my Libraries and/or XtraLibraries Folders when I am compiling my application
I get the following error: java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

After a lot of Googling about the specific error the majority of fixes implied that the error was because of missing "commons-lang-2.6.jar", "commons-logging-1.1.3.jar" from the Libraries Path.

I've made sure that these files along with "jackcess-1.2.10.jar", "Jackcess.jar" and "Jackcess.xml" do exist in my /B4J/Libraries path, but
still get the specific error during compilation.

Any help will be greatly appreciated.
 

Christos Dorotheou

Member
Licensed User
Longtime User
I see that Commons-lang-2.6.jar is included in the jar file. Have you copied it together with the library?
Dear Erel,

All related files are in the Libraries Folder of B4J and I have also made sure that the paths in B4J are correct.

C:\Program Files\Anywhere Software\B4J\Libraries, contains all of the following files.

1. jackcess-1.2.10.jar
2. Jackcess.jar
3. Jackcess.xml
4. commons-lang-2.6.jar
5. commons-logging-1.1.3.jar

Thanks for the reply

P.S. I forgot to mention that I have no problem to open an Access 2003 mdb file using
jackess library with B4A.
 

Beja

Expert
Licensed User
Longtime User
hello,
how to add a record in a table

Hi Sultan,
You have 2 options..
1- go back to MS Access and add the record in the original mdb and copy it again.
2- Use the code Erel provided earlier:

B4X:
AddRow(ArrayAsObject("1", "2", "3")
'Or
Dim row(10) As Object
row(0) = 3
row(1)
'...
AddRow(row)
 
Last edited:

sultan87

Active Member
Licensed User
Longtime User
Hi Sultan,
You have 2 options..
1- go back to MS Access and add the record in the original mdb and copy it again.
2- Use the code Erel provided earlier:

B4X:
AddRow(ArrayAsObject("1", "2", "3")
'Or
Dim row(10) As Object
row(0) = 3
row(1)
'...
AddRow(row)
Hello
I want to add, edit and delete from App Basic4Android
Your solution 1 does not suit me
I look at the code Erel
Best Regards
 

Beja

Expert
Licensed User
Longtime User
Yes I would also go with Erel's code..

But if I must have a new database with so many records with so many fields, then I would go ahead and do it in MS Access, because it is faster for me. Anyways I wanted to give all available ways I knew.
 

Beja

Expert
Licensed User
Longtime User
Long time ago I posted a problem but without answer yet. #40 Reply
I still have this prob.. display of a very long list of the table structure (field descriptors... etc) and then a list of Northwind tables' names.. and so.
I thought if the lib was accompanied by a simple mdb table with few records (rows) that would have been more helpful, instead of a huge database like Northwind.

best
 

MrKim

Well-Known Member
Licensed User
Longtime User
The Jackcess library lets you read and update MS Access database files (mdb files). It supports Access versions 200 to 2010.

The library wraps the Jackcess Java library - details and licensing information are in the archive and the xml documentation.

It is important to note that the jackcess documentation specifically states that NONE of the standard Access file/table/record locking protocols are followed which means that if you write data using jackcess in a multiuser environment corruption is almost inevitable.
 

Gearcam

Active Member
Licensed User
Longtime User
can you access a database on a local network server with something like
Path="//10.0.0.37/subdir"
Access.Open(Path & "/Northwind.mdb")

10:0:0:37 being the IP address of the host server

Steve
 

kepler

Active Member
Licensed User
Longtime User
Hi,

Does Jackcess works also with password protected .accdb Access databases?

Kind regards,

Kepler
 

kepler

Active Member
Licensed User
Longtime User
Hi,

Thank you very much Erel :)
As for the extension file, accdb, there's no problem either, right? Since it's from Microsoft Access 2010...

Kind regards,

Kepler
 
Top