SQLite on OS X

I found this link (https://wiki.openoffice.org/wiki/Documentation/How_Tos/Using_SQLite_With_OpenOffice.org) about using SQLite with OpenOffice, but I am having trouble finding updated info about using SQLite with LibreOffice and the link talks abut doing this on Windows and Linux, but does not mention OS X or Mac at all. (There’s also this, from 2 years ago: http://ask.libreoffice.org/en/question/5523/sqlite-driver-for-mac-os-x-and-other-oss/)

I’ve tried a few possibilities, but I can’t get LibreOffice to read my SQLite DB files. Is there anything more current that allows use of SQLite with LibreOffice on OS X?

Hal

Hal,

I found this link (https://wiki.openoffice.org/wiki/Documentation/How_Tos/Using_SQLite_With_OpenOffice.org) about using SQLite with OpenOffice, but I am having trouble finding updated info about using SQLite with LibreOffice and the link talks abut doing this on Windows and Linux, but does not mention OS X or Mac at all. (There’s also this, from 2 years ago: http://ask.libreoffice.org/en/question/5523/sqlite-driver-for-mac-os-x-and-other-oss/)

I’ve tried a few possibilities, but I can’t get LibreOffice to read my SQLite DB files. Is there anything more current that allows use of SQLite with LibreOffice on OS X?

There used to be an extension that worked on Linux and Windows, but I
don't recall it ever working on OSX.

Download a corresponding JDBC driver for SQLite, there are several
available, including Christian Werner's own package.

Create your sqlite database beforehand with an ad hoc tool.

Set up a database file that connects to the sqlite file via the JDBC
driver. You will have to add the JAR file to the classpath in the Java
options setup of LO.

When you start the db creation wizard in LO, you will need to find the
driver connection string and driver name - these are often provided
either in the driver documentation, or the corresponding web site

http://www.ch-werner.de/javasqlite/

I haven't tried the driver above, but was successful with a different
driver that I downloaded here :

http://www.java2s.com/Code/Jar/s/Downloadsqlitejdbcjar.htm

In the db setup wizard :

URL sqlite://absolute/path/to/test.sqlite3
JDBC Driver Class : org.sqlite.JDBC

This works for me on OSX 10.9.5

Alex

Hi :slight_smile:
You might need a newer "connector". I'm not sure how to get one. It might
be that you'll need to compile one yourself but again i have no idea how to
do that either.
Apols and regards from
Tom :slight_smile:

Forgot to add that you will possibly need to tick a couple of boxes in
the Advanced Properties dialog, the last two to be precise :

Manage primary keys
Respect the resultset type for the database driver

The last one avoids a unsupported scroll_forward only cursor setting.

Alex

Hal,

You might have found this out already, but I could only obtain read
access to my test sqlite dbs using the jdbc drivers and your sqlite db
must exist already before you make the connection, i.e. you can't use LO
to create new sqlite dbs.

I would welcome feedback from others on this, if their results are
different.

Alex