Using SQLite database with OpenOffice.org

To use SQLite database with OpenOffice.org or LibreOffice:

First install:
sudo apt-get install unixodbc unixodbc-bin
sudo apt-get install libsqliteodbc

Then run:
ODBCCreateDataSourceQ4 (create data source for “user”)
ODBCManageDataSourcesQ4 (if needed)

In Office:

First register the database in Base, then go on using it in Calc and Writer

Base:
Connect to an existing database -> ODBC

Calc:
View -> Data sources

Writer:
View -> Data sources

 

P.S.

If for any reason the configuration fails, you can try to set it up manually.

First, edit file /etc/odbcinst.ini and enter database driver data, like this:

[SQLite3]
Description=SQLite3 ODBC Driver
Driver=/usr/lib/i386-linux-gnu/odbc/libsqlite3odbc.so
Setup=/usr/lib/i386-linux-gnu/odbc/libsqlite3odbc.so
Threading=2

Then enter database specific parameters in a hidden file .odbc.ini in your user directory (if the database is to be used by a single user), e.g.:

[myTest]
Description=My test database
Driver=SQLite3
Database=/home/user/Databases/mytest.db
Timeout=2000

 

Advertisements


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s